conditional sum

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.
 
P

Phik

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.
 
P

Peo Sjoblom

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
 
P

Paul

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).
 
T

Tat

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top