在多列中查找条件,并对每个匹配值的偏移进行求和
我需要根据一个标准,从每个值的列数设置得到多个列的值的总和。
例如:
Column 1 Column2 Column3 Column4 Column5 Column6 Staff 1 staff2 status --- location --- cost status --- location --- cost g london 500 y manchester 250 y birmingham 450 g scotland 100
我想总结状态为“g”的所有费用。 我一直在试图总结,sumif,sumifs,sumproduct,offset和find,我只是不确定正确的function组合。
任何帮助,将不胜感激。
谢谢
就像是:
((A:A =“g”)*(C:C))+ SUMPRODUCT((D:D =“g”)*(F:F))
使用总和范围偏离标准范围的2列的SUMIF
公式更简单 – 那么您可以对所有列使用单个SUMIF
函数,例如
=SUMIF(A:HZ,"g",C:IB)