0

I am helping a friend with a work task he's been given and can't figure out the last part. We are given a matrix with a list of workers / users in the following layout:

Location  | First Name | Last Name | Property 1 | Property 2 | Property 3 | .. | Property N
Frankfurt | Adam       | Schmidt   | X          |            | X          | .. | X,

i.e. the properties are in boolean form (X to indicate 'Yes', or empty to indicate 'No').

The task is to search all users based on Location + 1 property that we are able to select from the N properties, i.e. we have a drop-down menu somewhere with all properties 1,2,..,N where we can select exactly 1 of the properties.

The output should be the format: Location | First Name | Last Name.

So, my idea was to replace the standard IF(("array for criteria 1"= "criteria 1") * ("array for criteria 2" = "yes"), ...) with the ADDRESS of the property we select, which we then transformed from text value into cell reference using the INDIRECT function.

To give an example, if we select property 1 (located in column D) in the drop-down menu, the ADDRESS function will return $D$1 as the starting field, and $D$100 as the ending field. These fields are then used inside an INDIRECT function inside the main (long) search function.

I've seen from other posts on the internet that it is possible to use SUM(INDIRECT(cell with starting cell defined&":"&cell with ending cell defined)), so I tried something similar in my function, but it doesn't seem to work.

Here is a picture of the formula & layout of the excel file. picture

4

2 回答 2

1

您应该将工作表组织成 3 个部分:

  1. 数据集
  2. 标准
  3. 结果集

高级过滤器

按照步骤为搜索创建按钮操作。

  1. 导航到“开发人员”选项卡。
  2. 单击插入 > 按钮。
  3. 画一个按钮。将显示“分配宏”对话框。
  4. 点击记录。
  5. 输入宏名称为“SearchRecords”,然后单击“确定”。
  6. 单击任何空单元格。导航到“数据”选项卡。
  7. 在“排序和筛选”部分中,单击“高级”。
  8. 选择“复制到另一个位置”单选按钮并根据数据集和标准位置输入范围。

选择高级过滤器选项

  1. 单击确定。
  2. 导航到“开发人员”选项卡,然后单击“停止录制”。
  3. 将按钮重命名为“搜索”。

现在您可以更新搜索条件并单击搜索按钮以更新相邻位置的结果。

于 2015-09-02T10:00:01.280 回答
0

一种更简单的方法是按如下方式组织您的输入数据: 透视友好数据

这个数据集是 Pivot 友好的。然后,您可以创建数据集的数据透视表。将 Location 和 Property 字段移至 Report Filter 部分,将 Full Name 移至 Row Labels 部分,将 Location 移至 Values 部分。

请注意,全名只是“名字”和“姓氏”的串联值。

于 2015-09-02T10:09:06.050 回答