Basic sumif question

P

Paul Malbon

This may sound stupid but please bear with me.

I want to calculate the sum of a column base on a true or false query.

Column A Row 4 has the value of F or M, I want to sum up Column A row 6 to
row30 depending on the value of row 4, in row A 33. So in structured English
I would assume it would be...

If A4 = F Then A33 = A6:A33

In Excel I have tried this...
=SUMIF(B9:B33,"=F")

But it returns a value of 0 even though I have values in A6:A30. Anyone have
any ideas?

Thanks

Paul
 
J

Jerry W. Lewis

I found your description to be somewhat confusing.

One interpretation would use
=SUMIF(B9:B33,"F",A6:A30)
which would include A6 in the sum if B9="F", include A7 in B10="F", ...

In SUMIF, the number of test cells must equal the number of cells to
potentially sum.

Another interpretation would use
=IF(A4="F",SUM(A6:A33),0)

Jerry
 

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