Lob,
You wouldn't need to use code. For example, the equation
=SUMIF($Q$23:$Q$200,"D",V23:V200)- SUMIF($Q$23:$Q$200,"P",V23:V200)
should add all the values in column V where the corresponding row in column
Q is "D", then subtract any whose corresponding value is "P"
HTH,
Bernie
MS Excel MVP
"lob" wrote in message
oups.com...
Hey Bernie
This works great! Thanks.
I have another spreadsheet that I would like to accomplish a similar
task.
V1=SUM(V23:V200) and this is copied through to IR1.
Is there a code that could be entered to sum only the cells for each
perticular column have a "D" in cell Q for that row,
subtract (create a negative value) to all the cells for each perticular
column have a "P" in cell Q for that row,
and skip (create a neutral value) the sum on the cells for each
perticular column have a "O" in cell Q for that row.
I tried playing with the original code you sent me, but was
unsuccesfull.
Thanks very much for your help, you have opened the door for me to
learn more.
Lob
|