conditional sum

  • Thread starter Thread starter Tat
  • Start date Start date
T

Tat

How can you copy conditional sum to other cells. I always
get a value error. So far I have to input this add-in cell
by cell. Not very efficient.
I tried copying and just changing the range in the formula
but it still gives me a value error.
 
You should be using the SUMIF function:

=SUMIF($C$8:$C$185,"DT-A-H",$D$8:$D$185)
The absolute references should allow you to copy this cell
to others.
 
Don't know why you would get that (did you enter it with ctrl + shift &
enter?), but if you want to sum column D where C holds "DT-A-H" there are
better ways than an array formula

=SUMIF($C$8:$C$185,"DT-A-H",$D$8:$D$184)

entered normally
 
As to why you get the #VALUE error:
This is an array-formula. After you edit the range, you must use
CTRL+SHIFT+ENTER, not just ENTER.

As to how you copy:
All your references are absolute, so when you copy/paste you will get
exactly the same formula. Presumably that isn't what you want. You need to
omit the $ sign in front of any row/column reference that you want to be
relative (i.e. so that it will adjust as you copy/paste).
 
Thank you everyone for the input. I did not know about the
CNTRL SHIFT ENTER. That is helpful information. The sumif
function also works great!

Thanks again.
 
Back
Top