Summing Based on Range

LEGION

New Member
Joined
Apr 8, 2010
Messages
7
Dear All,

I need to do the following:

I have a price increase for item 12345 for

a.) 100 - 200 = 1.5$
b.) 200 - 300 = 1.4$
c.) 300 - 400 = 1.3$

I have a history for 12345 from the last year where sometimes it was ordered in the following quantities:

1.) 100 (would be 1.5)
2.) 200 (would be 1.4)
3.) 305 (would be ???)

The thing here is, I can not use sumproduct() for history values that are different from the standard quantities defined under a.b.c.

Can the sumproduct be changed to also allow checking values which are different from the standard values?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Currently, my formula looks like this:

PHP:
=SUMPRODUCT((priceinc!$A$2:$A$45=ser_3396!$F2)*(priceinc!$B$2:$B$45=ser_3396!$G2)*(priceinc!$C$2:$C$45))

Of course, the problem being here the second part priceinc!$B$2:$B$45=ser_3396!$G2 ... because of the = it will only return values which are exactly the same quantity as the standard quantities.

When I use <= it will sum all the other defined standard values together, based on how large the actual history value is.

It only works, atm, for those quantities ordered which are exactly the same as the defined standard values (quantities).
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,273
Members
448,559
Latest member
MrPJ_Harper

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