Thread: Looping
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Looping

Try this

=SUMPRODUCT((MONTH(A1:A20)=C1)*(YEAR(A1:A20)=D1)*( B1:B20))

Mike

"LaDdIe" wrote:

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