Sumproduct with multiple criteria

aarti_rto

New Member
Joined
Nov 29, 2019
Messages
49
Office Version
  1. 2016
Platform
  1. Windows
  2. Web
Hi,

I have below data..and need sumproduct in such a way that if RM PO price is greater than 0 sumproduct must include plan inward * RM PO Price and if RM PO price is less than 0 sumproduct must include plan inward * FG PO Price

in below data sumproduct calc should - sumof ( (0.76*1000)+(0.59*2000)+(32.67*1000)+(25.27*2000)+(2*3000)).please suggest how to do this in sumproduct formula or is there any other formula?

FG PO priceRM PO PricePlan Inward
0.7600.00
1000​
0.5900.00
2000​
0.00032.67
1000​
0.00025.27
2000​
1.0002.00
3000​
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
This would do it i believe:

=SUMPRODUCT(--(((B2:B6>0)*B2:B6)+((B2:B6<=0)*A2:A6)),C2:C6)
 
Upvote 0
Solution
thanks,
why you used -- in this formula,asking just to understand
 
Upvote 0
Looking at it probably wasnt required in this instance. It will convert a TRUE/FALSE result into a 1 or 0 result.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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