How do I sum dollars in one column based on dates in another?

G

Guest

How can I sum the total numbers contained in one column based on dates in
another column?
Example: I need the total of 5 units sold int the month of January 2006. I
have the sale ammounts in one column and the closing dates in another.
What forumla would I use for this?
Thanks in advance for any help.
 
P

Peo Sjoblom

=SUMPRODUCT(--(MONTH(B2:B50)=1),--(YEAR(B2:B50)=2006),A2:A50)

for January

change 1 in the month part to a different month



--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon
 
P

proper

If I understand correctly what you need, then use SUMIF function.

For example, if you have dates in column A and amounts in column B, the
formula will look like:

=sumif(A:A,"Month_You_Need",B:B)

Month_You_Need is the month for which you want to add the amounts. If
your dates are in a date format (not months or month numbers), you
would want to convert them into month numbers first. So, you would add
a new column, say C, and enter formula MONTH(Cell A) into it. Then,
your SUMIF function will look like this:

=sumif(C:C,"Month_You_Need",B:B),

where Month_You_Need will be a number of the month you need (w/out "").
 

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