Looping

L

LaDdIe

Hi,

Col A contains dates "dd/mm/yyyy"
Col B Contains values

C1 is a variable month number 1-12
D1 is a variable year

I need E1 to sum all values in Col B that match the coresponding date of
Col A based on the criteria set in C1 & D1.

Thanks.

LaDdIe
 
L

Lars-Åke Aspelin

Hi,

Col A contains dates "dd/mm/yyyy"
Col B Contains values

C1 is a variable month number 1-12
D1 is a variable year

I need E1 to sum all values in Col B that match the coresponding date of
Col A based on the criteria set in C1 & D1.

Thanks.

LaDdIe


Try this formula in cell E1:

=SUMPRODUCT((YEAR(A1:A10)=D1)*(MONTH(A1:A10)=C1)*(B1:B10))

Change the 10 in three place to cover then number of rows with data in
columns A and B.

Hope this helps / Lars-Åke
 

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