使用多个位置自动填充多个单元格

我现在有一张House Keeping(HK)表,他们进来时分发给女生。为了节省上午的时间,我一直在试着input一个公式,自动将所有房间从总目录转移到个人香港的床单 目前港交所目前看起来像是这样,但没有破折号:

Housekeeper ---------- Room --------- Status ------ Set Up Katie ------------------ 1 ---------- Ready ------- Double Sue -------------------- 2 ------ Departing ------- Single Katie ------------------ 3 ------ Stay over ------- Family 

这继续到43室

我想用香港的名字作为主要的资料来源,所以当我在香港的单张上select他们的名字(使用一个下拉菜单)时,它会自动填入与房间相关的所有单元格。

我写了一个如何做到这一点的教程,让我知道如果你有任何问题:

http://www.excelforum.com/tips-and-tutorials/947848-lookup-a-value-and-return-multiple-results.html

如果你有一个单一的表格,所有的信息,你想为每个女孩轮stream创build一个“提取”,至less有两个选项

1)如果您只需要将每张香港的纸张打印一次,请使用主纸张上的“自动过滤”选项,然后点击“打印” – 然后重复每个pipe家。 它仍然涉及到一些工作(虽然只有43个房间,也可能是less数几个pipe家,但事实并非如此)。

2)如果你想在每个pipe家的工作簿中有一个单独的工作表,你可能想用一个VBAmacros来自动化一些事情。 这并不难,但考虑到你问这个问题,你可能不想解决这个问题。 如果你这样做 – 这是一个方法:

  1. 用名为“MasterSheet”的工作表创build工作簿:这是放置所有信息的地方
  2. 为每个pipe家创build一个单独的表单 – 叫你的表“Katie”,“Sue”等 – 每个员工一个(不pipe他们是否在今天的名单上)
  3. 将下面的代码添加到“模块”中:从工作簿中按Alt-F11 ,然后(在VBA编辑器中)插入…模块并粘贴以下代码:
 Sub createDailyWorklist() ' ' Update a series of worksheets based on the first ("Master") sheet ' ' Dim sh As Worksheet Application.ScreenUpdating = False For Each sh In ActiveWorkbook.Sheets If Not sh.Name = "MasterSheet" Then ' skip first sheet - it is the "master" sh.Activate ' select the sheet sh.Cells.Clear ' remove old content ' set the criteria for the filter: sh.Range("A1").Value = "HK" ' column to filter on sh.Range("A2").Value = "'=" & sh.Name ' value to find = sheet name (housekeeper name) ' using the '= to get an exact match (not "starting with") ' otherwise Jane would get Janet's work too... ' there are 43 rooms so we know where the input data range is: Sheets("MasterSheet").Range("A1:D44").AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=sh.Range("A1:A2"), CopyToRange:=Range("A3:D3"), Unique _ :=False Rows("1:2").Delete ' get rid of the criteria Columns("A:D").EntireColumn.AutoFit ' make the columns just wide enough End If Next sh Application.ScreenUpdating = True End Sub 

当您想创build工作列表时,按Alt-F8 ,然后从出现的菜单中select“createDailyWorklist”。 点击“运行”

嘿,快死了! 每位pipe家有一张床单,需要做的房间等

显然你可以修改这个更好地适合你的需要 – 格式,复制字段的数量等,但我希望这会让你去。