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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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