help calculated total for each month

J

jengy1

i am trying to calulate the total intake for each month
ie january = 10
february = 6
march = 10

column a column b
date intake
01/01/09 10
01/03/09 2
11/02/09 6
12/03/09 7
12/03/09 1

please help
 
J

Jacob Skaria

The below will return the sum for the month of May

=SUM(IF(MONTH(A2:A100)=5,B2:B100))

Suppose in C2 you have date entered formated to display January, the below
should return the total for January
=SUM(IF(MONTH(A2:A100)=Month(c2),B2:B100))

If this post helps click Yes
 
J

Jacob Skaria

Oops, please ignore the previous post

C1 = date
=SUMPRODUCT(--(MONTH(A2:A10)=MONTH(C2)),--(B2:B10))


If this post helps click Yes
 
M

Marcelo

=SUMPRODUCT(--(MONTH($E$11:$E$21)="1"*(F11:F21)))


"1" = January, adjust your range as need

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"jengy1" escreveu:
 
M

Marcelo

Jacob, the previous formula runs, as an array, he should enter with
Ctrl+Shif+enter, not just enter

chers
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Jacob Skaria" escreveu:
 

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