Using the 2 values from one column with Conditional Sum

moppy_j

New Member
Joined
Oct 11, 2004
Messages
20
Hi, i need help with a Conditional Sum. The below formula is working properly.

=SUM(IF($B$5:$B$198="ESM",IF($K$5:$K$198="China",IF($A$5:$A$198="Forecast",$P$5:$P$198,0),0),0))

Whereby Column B= ESM, Column K is China, Column A is Forecast and Column P is the data to Sum.

What i need to do now is a sum whereby instead of adding the China cells, I add Hong Kong and Taiwan.

So, i think my problem is that it's trying to add cells whereby the value in K is both Hong Kong AND Taiwan, when i need to add cells where Column K = Hong Kong OR Taiwan.

Any thoughts about how i can add the OR syntax into this formula?

Thanks

Chris
 
Last edited:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

moppy_j

New Member
Joined
Oct 11, 2004
Messages
20
I am trying the sumproduct formula now but i'm not familiar with it.

So far i have managed this

=SUMPRODUCT(($A$4:$A$198="Forecast")*($B$4:$B$198="ESM")*($K$4:$K$198="Hong Kong")*($P$4:$P$198))

But it hasn't worked.

Any ideas?

For simplicity reasons i am trying to do it for Hong Kong only at first

Thanks
 

Watch MrExcel Video

Forum statistics

Threads
1,129,754
Messages
5,638,170
Members
417,011
Latest member
Amaden95

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
Top