Aussiebear
01-07-2011, 05:49 AM
The function SUMIF works on the premise that you have a range, criteria, and the optional argument of the sum range as in
=SUMIF(A:A,">=0", A:A)
which in this case could just as easily be written as
=SUMIF(A:A,">=0")
However this requires you to know the value of the criteria to base the summing on. My question is this, what happens if your criteria is a variable, and that variable resides in a cell outside of the current range to be summed?
Since Excel won't allow me to write something like this;
=SUMIF(A:A,">=$B$4",A:A)
where cell $B$4 contains a variable that I wish to alter to test an outcome. Do I need a vba workaround or am I missing something in this issue?
=SUMIF(A:A,">=0", A:A)
which in this case could just as easily be written as
=SUMIF(A:A,">=0")
However this requires you to know the value of the criteria to base the summing on. My question is this, what happens if your criteria is a variable, and that variable resides in a cell outside of the current range to be summed?
Since Excel won't allow me to write something like this;
=SUMIF(A:A,">=$B$4",A:A)
where cell $B$4 contains a variable that I wish to alter to test an outcome. Do I need a vba workaround or am I missing something in this issue?