View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
JCS JCS is offline
external usenet poster
 
Posts: 93
Default Sumproduct Question

Hi,

I got it excited to quickly. Look's like Gary is right. When I enter a 1 I
get 3 instead of 1 or if I enter 11 I get 4 instead of 3. OK, I give up what
is a better way (if any) to do this?

John

"JCS" wrote:

Hi Doug,

You nailed it! Thank you! I gotta tell ya, that I thought I tried it and
that it didn't work. I've tried so many variations I don't remember what
exactly i tried. I've worked with the Sumproduct function before and have
had no problems. Could you briefly give me an expalanation of what your
solution does?

Thanks!
John

"Huber57" wrote:

John,
If you want the result of 2, put a plus (+) sign instead of the first
multiplication (*) sign.

=SUMPRODUCT((E21:E23=D21)+(F21:F23<=D21)*(G21:G23 ))

Sincerely,

Doug

"JCS" wrote:

Hi All,

I've been experiementing with the Sumproduct function in Excel 2007 and ran
across a problem with the function that I cannot figure out. The following
is an example: I have the following table in cells E21 to G23:

1 5 1
6 10 2
11 15 3


In cell D21 I input a value (e.g. 8)
In cell E25 I have the followng formula:
=SUMPRODUCT((E21:E23=D21)*(F21:F23<=D21)*(G21:G23 ))
In cell D21, if I enter 8 I should see 2 - instead I get 0. Any ideas on
what could be wrong? Or would it be better to use another function? Thanks
in advance!!

John