View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Sumproduct Multiple < Conditions

How about:

=SUMPRODUCT(--(X2:X500<"foo"),--(X2:X500<"oof"),--(Y2:Y500<100),(Z2:Z500))

And I'd be careful with your original formula. I think you're missing a pair of
()'s.

=SUMPRODUCT(--((X2:X500="foo")+(X2:X500="oof")0),--(Y2:Y500<100),(Z2:Z500))
should be:
=SUMPRODUCT(--(((X2:X500="foo")+(X2:X500="oof"))0),--(Y2:Y500<100),(Z2:Z500))

(foo+oof)0, right?


"undrline via OfficeKB.com" wrote:

So, normally I would use this format for my conditional formulas:

=SUMPRODUCT(--((X2:X500="foo")+(X2:X500="oof")0),--(Y2:Y500<100),(Z2:Z500))

Which gets me the sum of column Z, if column Y is less than 100, and column X
is "foo" OR "oof"

I'm keep hitting a problem, though, with one type of conditional . . . what
if I want every thing that is NEITHER "foo" NOR "oof" ?

=SUMPRODUCT(--((X2:X500<"foo")+(X2:X500<"oof")0),--(Y2:Y500<100),(Z2:Z500))

is wrong . . . because it's telling it NOT "foo" OR NOT "oof" . . .

thank you for any help.

--
Message posted via http://www.officekb.com


--

Dave Peterson