Excel 包含 ID 组的 COUNTIF
Excel COUNTIF with ID groups
我的 Excel A 列中有 ID,每个 ID 代表一个博客 post,B 列是博客的语言,C 列是否应该迁移。 ID 最多可以相同 3 次,因为一个博客 post 可以用 3 种不同的语言创建。
ID Language Migration
44021 German Yes
44021 French No
44021 Italian No
44014 German No
44014 French Yes
44014 Italian No
43999 German No
43999 French Yes
43999 Italian Yes
44001 French Yes
55504 German No
55504 French No
最后我必须能够说出是否应该迁移 ID 组并声明是否应该在德语版本或其他语言版本上到期。
输出应如下所示:
ID Language Migration Result
44021 German Yes Due to german
44021 French No Due to german
44021 Italian No Due to german
44014 German No Due to other lang
44014 French Yes Due to other lang
44014 Italian No Due to other lang
43999 German Yes Due to german
43999 French Yes Due to german
43999 Italian Yes Due to german
44001 French Yes Due to other lang
55504 German No No Migration
55504 French No No Migration
本身就很简单。我只是不知道如何在 Excel 公式中执行此操作,如果它具有最多 3 个具有相同 ID 的条目组。换句话说,公式必须尊重相同的 ID 并比较它们的详细信息。
在D2
中:
=IF(COUNTIFS(A:A,A2,C:C,"Yes"),IF(COUNTIFS(A:A,A2,B:B,"German",C:C,"Yes"),"Due to German","Due to other lang"),"No Migration")
请注意,您的最终结果数据与 ID 43999 上的输入数据不同。
我的 Excel A 列中有 ID,每个 ID 代表一个博客 post,B 列是博客的语言,C 列是否应该迁移。 ID 最多可以相同 3 次,因为一个博客 post 可以用 3 种不同的语言创建。
ID Language Migration
44021 German Yes
44021 French No
44021 Italian No
44014 German No
44014 French Yes
44014 Italian No
43999 German No
43999 French Yes
43999 Italian Yes
44001 French Yes
55504 German No
55504 French No
最后我必须能够说出是否应该迁移 ID 组并声明是否应该在德语版本或其他语言版本上到期。
输出应如下所示:
ID Language Migration Result
44021 German Yes Due to german
44021 French No Due to german
44021 Italian No Due to german
44014 German No Due to other lang
44014 French Yes Due to other lang
44014 Italian No Due to other lang
43999 German Yes Due to german
43999 French Yes Due to german
43999 Italian Yes Due to german
44001 French Yes Due to other lang
55504 German No No Migration
55504 French No No Migration
本身就很简单。我只是不知道如何在 Excel 公式中执行此操作,如果它具有最多 3 个具有相同 ID 的条目组。换句话说,公式必须尊重相同的 ID 并比较它们的详细信息。
在D2
中:
=IF(COUNTIFS(A:A,A2,C:C,"Yes"),IF(COUNTIFS(A:A,A2,B:B,"German",C:C,"Yes"),"Due to German","Due to other lang"),"No Migration")
请注意,您的最终结果数据与 ID 43999 上的输入数据不同。