Running balance with a condition

mondayblues

New Member
Joined
Mar 5, 2018
Messages
1
Hi, i'm trying to get an an amount allocated across a few lots based on its rank. I managed to do this with the formula below (table starts at A1). For apples =MIN(C2,$B$10-SUMIF($E$2:$E$4,"<"&E2,$D$2:$D$4)) For bananas =MIN(C5,$B$11-SUMIF($E$5:$E$7,"<"&E5,$D$5:$D$7)) Now instead of writing 2 separate formulas, i'm trying to expand this to do the same based on its group as well. This is where i need help. Group Lot Units Allocation Rank Apples 1.1 29200 29062 1 Apples 1.2 2000 0 2 Apples 1.3 3000 0 3 Bananas 2.1 2778 1136 3 Bananas 2.2 2211 2211 1 Bananas 2.3 5942 5942 2 Allocation Apples 29062 Bananas 9289 Any suggestions?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,223,981
Messages
6,175,773
Members
452,668
Latest member
mrider123

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