SUMPRODUCT WITH AN "OR" MAYBE????

G

Guest

I received some great help on my last question and know need to make it a
little more complex if you will.

Current Formula is:

=SUMPRODUCT((Sheet1!A2:A4=3)*(Sheet!B2:B4=100)*(Sheet!C2:C4="D")*Sheet1!D2:D4)

Now I would like it to do:

=SUMPRODUCT((Sheet!A2:A4=3 OR A OR 4 OR B OR 999999) and then continue on.

Is it possible to use an or statement in the formula or not?
 
B

Bernie Deitrick

Sean,

To get an OR operation, simply Add the fields (using a + ) instead of
multiplying (AND, using *).

HTH,
Bernie
MS Excel MVP
 
D

Don Guillett

You can use the + instead of *

Or if you wanted different values in the same range

=SUMPRODUCT((Sheet1!A2:A4={3,"A",8,12})*(Sheet!B2:B4=100)*(Sheet!C2:C4="D")*
Sheet1!D2:D4)
 
P

papou

Hi Sean
Use the + (plus) sign as OR operator, ie:
=SUMPRODUCT((Sheet1!A2:A4=3)+(Sheet!B2:B4=100)+(Sheet!C2:C4="D")*Sheet1!D2:D
4)

HTH
Cordially
Pascal
 

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