Distributing value automatically across cells

osk89

New Member
Joined
Jul 21, 2018
Messages
16
i have line load in column B, but the line in capped to 100 kW so the load more than 100 kW should be shifted to the cells where the load is less than hundred (can be seen in column D). from the table, we see the accumulated load to be shifted is 25 kW. this should be shifted to the cells starting from F19 on wards. but the value in row E should be completely filled before overflowing to the next cell. when it reaches the end of the table, it should move to the top and start distributing


[TABLE="width: 607"]
<tbody>[TR]
[TD][/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]line Load[/TD]
[TD]line load capped to 100 kw[/TD]
[TD]to be shifted[/TD]
[TD]delta to 100[/TD]
[TD]Compensated load[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]93[/TD]
[TD]93[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]94[/TD]
[TD]94[/TD]
[TD]0[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]95[/TD]
[TD]95[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]96[/TD]
[TD]96[/TD]
[TD]0[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]97[/TD]
[TD]97[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]98[/TD]
[TD]98[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]99[/TD]
[TD]99[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8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
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]96[/TD]
[TD]96[/TD]
[TD]0[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD]95[/TD]
[TD]95[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD]94[/TD]
[TD]94[/TD]
[TD]0[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]93[/TD]
[TD]93[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD]92[/TD]
[TD]92[/TD]
[TD]0[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]27[/TD]
[TD]91[/TD]
[TD]91[/TD]
[TD]0[/TD]
[TD]9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]28[/TD]
[TD]90[/TD]
[TD]90[/TD]
[TD]0[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]total 25[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
@osk: Sort descending by load.

Hi Shg,
actually i cant change the order of the rows, as each row represents a specific time during the day. continuing to distribute the load to the top means the load is shifted to the next day (last row is for mid night)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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