Need More SUMIF Help

D

Dale

I have a two-part question.

First, the initial help I received from the group on SUMIF worked great,
but I would like to expand that capability a bit more. I have a
worksheet with three columns of data, (Date, Earnings, and Category).
I need help in using the SUMIF function to sum the total of column B for
dates in a specific quarter. (i.e. Jan thru Mar) and a specific
category. I need to be able to total the earnings for all records that
were in the first quarter and in category 1. Using the below example, I
would expect the result to be $22.

Column A Column B Column C
Date
Earnings Category
01/01/04 $10 1
02/05/04 $11 2
03/10/04 $12 1
09/04/04 $15 3

Second I would like to better understand the answer that was previously
provided in regards to the SUMIF. Below is the SUMIF function I built
from the answer and it worked great, but I would like to know what the
hyphen or minus sign between the two SUMIF's means in the function.

=SUMIF(B1:B100,">=" &
DATE(2004,1,1),C1:C100)-SUMIF(B1:B100,">="&DATE(2004,12,31),C1:C100)

Thanks for the help
 
D

Domenic

For your first question...

=SUMPRODUCT(--(A2:A5>=DATE(2004,1,1)),--(A2:A5<=DATE(2004,3,31)),--(C2:C5=1),B2:B5)

or

=SUMPRODUCT(--(A2:A5>=D2),--(A2:A5<=E2),--(C2:C5=F2),B2:B5)

...where D2 contains your start date, E2 contains your end date, and F2
contains your category of interest.

Hope this helps!
 

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

Similar Threads


Top