SUMIF query


Posted by steve morley on December 12, 2000 7:42 AM

i want to show a financial total from a spreadsheet if 2 criteria are met and i am having difficulty.
col A shows the month
col B shows the revenue
col C shows a code number(5 digits)
what i want is;e.g.
the sum of cells in B if the month is May and the code no is 56712.
Help!!
steve

Posted by Loren on December 12, 2000 9:15 AM


Here is a site with your answer.........
http://www.mrexcel.com/tip031.shtml



Posted by Aladin Akyurek on December 12, 2000 11:26 AM

The following might (also) help, if I understood the question properly.

If A2 contains the first Month-value, B2 the first Revenue-value, and C2 the first Code-value, then enter in D2 the formula

=(A2=mcond)*(C2=ccond)*B2

and copy down this as far as needed.

Enter e.g., May in E2 and name this cell "mcond". Enter a code in F2, e.g., 56712, and name this cell "ccond".

Finally , use in for example in E3 the formula

=SUM(D:D), assuming that D1 is blank.

Aladin