Sumproduct if

Tiina

New Member
Joined
May 9, 2002
Messages
36
Hi,
I need to combine SUMPRODUCT and IF statements. I searched prior posts and found this formula as an example. IT WORKS!! Thank you!


=SUMPRODUCT(--($J$14:$J$33="service"),$K$14:$K$33,$Q$14:$Q$33)

But now I need to add an additional IF statement:

($J$14:$J$33="service") AND ($J$14:$J$33<>"xyz")

How do I achieve this?

Thank you!!
Tiina
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Tina,

This second condition seems to me unnecessary, because if any J is equal to "service" it is also different from "xyz".

M.
 
Upvote 0
how can j14 = service and xyz ? do you want to add service and xyz rows - what is in columns K and Q ?
 
Upvote 0
Sorry, I forgot to change the range. It is now in column B. Basically, I just want to know how to add conditions to sumproduct formula
Thanks
T

($J$14:$J$33="service") AND ($B$14:$B$33<>"xyz")
 
Upvote 0
Try

=SUMPRODUCT(--($B$14:$B$33<>"xyz"),--($J$14:$J$33="service"),$K$14:$K$33,$Q$14:$Q$33)

M.
 
Last edited:
Upvote 0
=sumproduct(($J$14:$J$33="service")*($B$14:$B$33<>"xyz")*($k$14:$k$33))

assuming values are in column K
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,178
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top