Evaluate row value as a sum of an array =< target total

George_Martin_3

New Member
Joined
Sep 12, 2015
Messages
20
My intention is to eventually build this into an aggregate function in order to evaluate unique demand fulfillment targets with current demanded order qty's in order to determine how many units on each can be met.

Basically have 200units intended for customer A for item A and customer A for item A has ordered 300units across 150 rows at 2units each. Assuming the orders are sorted accordingly, which quantities can be assigned partially up to the supply 200 vs demand 300?

Link to example data
VRcKeou.png

Imgur: The most awesome images on the Internet

So far the only thing I've come up with successfully is a way to identify unique records matching my criteria for customer and material

(this does not match the linked data)
IF(ROWS($F$6:F6)>$E$2,"",INDEX($C$2:$C$37,AGGREGATE(15,6,(ROW($D$2:$D$37)-ROW($D$2)+1)/ISNA(MATCH($D$2:$D$37,$B$2:$B$27,0)),ROWS($F$2:F2))))

and a half finished evaluation statement

=IF($A$2:A2)<=$L$8,$H2, $L$8 - ??? SUM(ROWS($A$2:A2) -1) ???
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,473
Messages
6,125,018
Members
449,203
Latest member
tungnmqn90

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