Sumif


Posted by Don Reynolds on December 12, 2000 7:50 AM

Can Sumif use a variable in the sum-range? I am using a forumla like sumif(b:b,a1,c:c), where I am trying to find every occurance of a1 in column b, and add the totals in colums c. The problem is I want to have the sum-range reference a variable so I can sum column d,e,f,g or whatever by simply changing a reference cell. I expect it would be something like Sumif(b:b,a1,a3), where cell a3 states the column c:c or d:d, etc. I can't get it. Thanks

Posted by Tim Francis-Wright on December 12, 2000 9:37 AM

Try the following:
=SUMIF(B:B,A1,INDIRECT(A3))

This does the trick.



Posted by Don Reynolds on December 15, 2000 7:17 AM

:Worked perfectly - thanks