View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hankinator hankinator is offline
external usenet poster
 
Posts: 4
Default using sumproduct

I need help trying to get a formula right.

On a worksheet named "GM", column A contains dates. Column E contains
numbers which I eventually want summed. Column H contains either the # 1, 2,
or 3.

On another worksheet, column A contains start dates and column B contains
end dates. In column C, I want to look at all rows of sheet "GM" and sum
column E if the date of that row falls between the start and end dates on the
current sheet AND if column H = 1.

Here's what I have but all I get is "#VALUE":

=SUMPRODUCT(GM!H2:H224=1,AND(GM!A2:A224=A2,GM!A2: A224<=B2),(GM!E2:E224))