Sumif date=date

R

red

I have two worksheets. First has values and dates when entered.
eg, 123 1/1/2008
234 15/1/2008
456 3/2/2008
654 7/2/2008
876 16/4/2008

Second has month headings:- January Febuary........

What i want to do is sumif(ws1!date column,ws2!column header,ws1!values)
Hope this is clear! i tried using MONTH with no luck
 
T

T. Valko

Try this...

Sheet2 A1:L1 = Jan, Feb, Mar, Apr, ....Dec

Enter this formula in Sheet2 A2 and copy across to L2:

=SUMPRODUCT(--(MONTH(Sheet1!$B1:$B10)=COLUMNS($A2:A2)),Sheet1!$A1:$A10)

Assuming there are no empty cells in your date column. An empty cell will
evaluate as month 1.
 
R

red

Many thanks, works a treat!!

T. Valko said:
Try this...

Sheet2 A1:L1 = Jan, Feb, Mar, Apr, ....Dec

Enter this formula in Sheet2 A2 and copy across to L2:

=SUMPRODUCT(--(MONTH(Sheet1!$B1:$B10)=COLUMNS($A2:A2)),Sheet1!$A1:$A10)

Assuming there are no empty cells in your date column. An empty cell will
evaluate as month 1.
 

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