SUMPRODUCT Can I use less than or equal to with this function

M

Mifty

Hi there,

I'm using this formula but can I amend it so that it counts less than or
equal to 35 rather thatn just 35?

=SUMPRODUCT(($C$2:$C$16010=R2)*($E$2:$E$16010="Mat")*($F$2:$F$16010="AT1")*($K$2:$K$16010=35))

Grateful for any help

Cheers
 
P

PCLIVE

Try this:

=SUMPRODUCT(($C$2:$C$16010=R2)*($E$2:$E$16010="Mat")*($F$2:$F$16010="AT1")*($K$2:$K$16010<=35))

I prefer this method. Though the result is the same.
=SUMPRODUCT(--($C$2:$C$16010=R2),--($E$2:$E$16010="Mat"),--($F$2:$F$16010="AT1"),--($K$2:$K$16010<=35))

HTH,
Paul
 
T

T. Valko

Sure:

...........*($K$2:$K$16010<=35))

However, if there are any empty cells in that range they will meet the
condition of <=35. If you don't want the empty cells counted then you need
to add another test:

...........*($K$2:$K$16010<=35)*($K$2:$K$16010<>""))
 
M

Mifty

Thank you Paul :)

Cheers
--
Mifty


PCLIVE said:
Try this:

=SUMPRODUCT(($C$2:$C$16010=R2)*($E$2:$E$16010="Mat")*($F$2:$F$16010="AT1")*($K$2:$K$16010<=35))

I prefer this method. Though the result is the same.
=SUMPRODUCT(--($C$2:$C$16010=R2),--($E$2:$E$16010="Mat"),--($F$2:$F$16010="AT1"),--($K$2:$K$16010<=35))

HTH,
Paul
 
P

PCLIVE

You're welcome. However, please make note of T. Valko's point about column
K values that are either empty.

--
 

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