SumIf Question

R

Ronda

I have a spreadsheet that I need to do a calculation if the answer is yes or
"Y". I put the formula below in and it works correctly for the "N" formula.
If the answer is "Y" the formula does not give me the sum of F1+G1 (actually
"-" but I put the number in as a negative) but the total of F1 instead.

=SUMIF(H1,"Y",F1:G1)+SUMIF(H1,"N",F1)
 
D

Dave Peterson

=sumif()
is usually used to compare a range of values against another value. Then add
the values in the other range.

If you're really only checking H1, maybe just changing your formula would be
easiest:

=if(h1="y",sum(f1:g1),0) + if(h1="n",f1,0)
 

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