根据详细信息 "table" 填充摘要 "table" 列
Populate summary "table" column based on details "table"
我已经尝试查找如何完成此操作,但不幸的是,这有点超出了我的 excel-fu(我可以在 SQL 中快速完成!)。 =22=]
基本上,在一个工作表中,我有以下详细信息"table"(我已经包含了列和行标签):
A B C D
1 owner name line # run?
2 A A1 10 Y
3 A A1 20 N
4 A A2 2 Y
5 A A2 14 Y
6 A A3 34 N
7 B B1 26 Y
8 B B1 59 Y
9 B B1 193 Y
10 B B1 194 Y
11 B B2 27 N
12 B B2 51 N
我在另一张工作表上有以下摘要"table"
A B C
1 owner name status
2 A A1
3 A A2
4 A A3
5 B B1
5 B B2
我需要根据详细信息 "table" 中的 run?
列填充摘要 "table" 中的 status
列,链接到所有者和名称列。
这是我期望得到的结果,以及原因:
A B C D
1 owner name expected status reason
2 A A1 Partial There are Y and N values for owner=A and name=A1 in the details table
3 A A2 Complete There are only Y values for the owner=A and name=A2 in the details table
4 A A3 Not Started There are only N values for the owner=A and name=A3 in the details table
5 B B1 Complete There are only Y values for the owner=B and name=B1 in the details table
5 B B2 Not Started There are only N values for the owner=B and name=B2 in the details table
我知道我可能需要 countifs 来计算是否存在 Y 和 N,再加上一个 IF 将输出转换为单词,这就是我可以计算 Y 和 N 存在的地步对于我正在努力解决的每个所有者+名称。
我在谷歌上搜索了如何找出给定所有者和姓名是否存在 Y and/or N,并且遇到了 this link which involves MATCH
and INDEX
但对于我来说,我可以'无法正常工作 - 我得到 #N/A
的输出,使用以下公式获得第一个状态:
=INDEX(A2:D12,0,MATCH(c2,'<Detail worksheet>'!A2:D12,0))
我做对了吗?或者有更好的方法吗? (我总是可以手动指定要在每个摘要 "table" 行的详细信息 "table" 中查看的行范围,但我想尽可能避免这种情况!)
我将公式分为两部分,这应该可以帮助您完成大部分工作。如果您的数据长度不确定,那么请注意您检查的行数,我的答案只转到第 13 行。
Summary Sheet
将列添加到拆分公式
Sheet 1
上图中Y列的公式为:
=COUNTIFS(Sheet1!$E:$E,Sheet2!$D,Sheet1!$B:$B,Sheet2!$B3,Sheet1!$C:$C,Sheet2!$C3)
我已经尝试查找如何完成此操作,但不幸的是,这有点超出了我的 excel-fu(我可以在 SQL 中快速完成!)。 =22=]
基本上,在一个工作表中,我有以下详细信息"table"(我已经包含了列和行标签):
A B C D
1 owner name line # run?
2 A A1 10 Y
3 A A1 20 N
4 A A2 2 Y
5 A A2 14 Y
6 A A3 34 N
7 B B1 26 Y
8 B B1 59 Y
9 B B1 193 Y
10 B B1 194 Y
11 B B2 27 N
12 B B2 51 N
我在另一张工作表上有以下摘要"table"
A B C
1 owner name status
2 A A1
3 A A2
4 A A3
5 B B1
5 B B2
我需要根据详细信息 "table" 中的 run?
列填充摘要 "table" 中的 status
列,链接到所有者和名称列。
这是我期望得到的结果,以及原因:
A B C D
1 owner name expected status reason
2 A A1 Partial There are Y and N values for owner=A and name=A1 in the details table
3 A A2 Complete There are only Y values for the owner=A and name=A2 in the details table
4 A A3 Not Started There are only N values for the owner=A and name=A3 in the details table
5 B B1 Complete There are only Y values for the owner=B and name=B1 in the details table
5 B B2 Not Started There are only N values for the owner=B and name=B2 in the details table
我知道我可能需要 countifs 来计算是否存在 Y 和 N,再加上一个 IF 将输出转换为单词,这就是我可以计算 Y 和 N 存在的地步对于我正在努力解决的每个所有者+名称。
我在谷歌上搜索了如何找出给定所有者和姓名是否存在 Y and/or N,并且遇到了 this link which involves MATCH
and INDEX
但对于我来说,我可以'无法正常工作 - 我得到 #N/A
的输出,使用以下公式获得第一个状态:
=INDEX(A2:D12,0,MATCH(c2,'<Detail worksheet>'!A2:D12,0))
我做对了吗?或者有更好的方法吗? (我总是可以手动指定要在每个摘要 "table" 行的详细信息 "table" 中查看的行范围,但我想尽可能避免这种情况!)
我将公式分为两部分,这应该可以帮助您完成大部分工作。如果您的数据长度不确定,那么请注意您检查的行数,我的答案只转到第 13 行。
Summary Sheet
将列添加到拆分公式
Sheet 1
上图中Y列的公式为:
=COUNTIFS(Sheet1!$E:$E,Sheet2!$D,Sheet1!$B:$B,Sheet2!$B3,Sheet1!$C:$C,Sheet2!$C3)