根据源表中的值计算其他表中的值

时间:2018-06-11 14:09:50

标签: excel excel-formula countif

我确定以前曾被问过,但我找不到它...... 在Excel中,我可以根据源表第一列中的值从其他表中使用公式COUNTIFSUMIF吗? 示例:

Index         StepCount     totalPass   totalFail
tblUserLogin    1               13          3
tblPMOUser      1               13          3
tblSAUser       1               13          3

B2中的公式类似于:
Count the steps in the table named A2
我认为我可以构建一个符合条件的字符串,我试过这个:=COUNTA("[@[Index]]"&"[Step]")无济于事。

C2和D2将是:
Count the number of PASS/FAIL in column D from the table named A2

我希望的两个结果:
1)将公式指向正确的方向 2)告诉我没有VB

就无法完成

1 个答案:

答案 0 :(得分:1)

所以对于你需要的步骤:

=COUNTA(INDIRECT(A2&"[Step]"))

只需对其他功能应用相同的功能。

或者如果是表格,请使用:

=COUNTA(INDIRECT([Index]&"[Step]"))