sumif


Posted by mcarter973 on June 20, 2001 6:10 AM

i need a formula that will sum all cells w/i a date
range.

for example column A lists all the days of the month
for 2000 and column B has numerical values. i want to sum all Jan...Feb...etc.

thanks.

Posted by zen on June 20, 2001 6:28 AM

you could add a 3rd column and use =text(a1,"mmmm") and copy down then hide it, then you could use sumif on that column.

i'll se if can come up with something better, but is any help

zen

Posted by Aladin Akyurek on June 20, 2001 6:32 AM

If I understood the question right, you have a case of multiconditional sum. SUMIF is only good for a single condition.

Lets say that you have 2 criterion dates C1 and C2. Use the following array-formula

=SUM((A1:A20)>=C1)*((A1:A20 )<=C2))*(B1:B20))

where C1 < C2, dates are in A1:A20, and the values to sum in B1:B20.

Aladin

Posted by Aladin Akyurek on June 20, 2001 6:35 AM

BTW

In case you need it, in order to array-enter a formula, you have to hit CONTROL+SHIFT+ENTER at the same time (not just enter).

Aladin

Posted by Loren on June 20, 2001 7:31 AM



Posted by mcarter973 on June 20, 2001 11:18 AM

loren -

that's exactly what i was looking for - i converted days to months and used sumif.

thanks