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


BCDEF

<tbody>
</tbody>
line Loadline load capped to 100 kwto be shifteddelta to 100Compensated load
1939307
2949406
3959505
4969604
5979703
6989802
7999901
810010000
910110010
1010210020
1110310030
1210410040
1310510050
1410410040
1510310030
1610210020
1710110010
1810010000
19999901
20989802
21979703
22969604
23959505
24949406
25939307
26929208
27919109
289090010
total 25

<tbody>
</tbody>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
A​
B​
C​
D​
E​
F​
G​
1​
Line
Load
Capped
Shift
Delta
2​
1​
93​
93​
0​
7​
C2: =MIN(B2, 100)
3​
2​
94​
94​
0​
6​
D2: =MAX(0, B2-100)
4​
3​
95​
95​
0​
5​
E2: =MAX(0, 100-B2)
5​
4​
96​
96​
0​
4​
6​
5​
97​
97​
0​
3​
7​
6​
98​
98​
0​
2​
8​
7​
99​
99​
0​
1​
9​
8​
100​
100​
0​
0​
10​
9​
101​
100​
1​
0​
11​
10​
102​
100​
2​
0​
12​
11​
103​
100​
3​
0​
13​
12​
104​
100​
4​
0​
14​
13​
105​
100​
5​
0​
15​
14​
104​
100​
4​
0​
16​
15​
103​
100​
3​
0​
17​
16​
102​
100​
2​
0​
18​
17​
101​
100​
1​
0​
19​
18​
100​
100​
0​
0​
20​
19​
99​
99​
0​
1​
21​
20​
98​
98​
0​
2​
22​
21​
97​
97​
0​
3​
23​
22​
96​
96​
0​
4​
24​
23​
95​
95​
0​
5​
25​
24​
94​
94​
0​
6​
26​
25​
93​
93​
0​
7​
27​
26​
92​
92​
0​
8​
28​
27​
91​
91​
0​
9​
29​
28​
90​
90​
0​
10​
 
Upvote 0
Hello SHG,
thanks for the reply, I think my post was not a bit confusing. the formula should be applied only in column "compensated load" and the total load at the end of column D .i.e. 25 should be distributed in col. F . the table should look like this


BCDEF

<tbody>
</tbody>
line Loadline load capped to 100 kwto be shifteddelta to 100Compensated load
1939307
2949406
3959505
4969604
5979703
6989802
7999901
810010000
910110010
1010210020
1110310030
1210410040
1310510050
1410410040
1510310030
1610210020
1710110010
1810010000
199999011
209898022
219797033
229696044
239595055
249494066
259393074
26929208
27919109
289090010
total 25

<tbody>
</tbody>


so the values in "compensated load" totals to 25
 
Upvote 0
in addition to previous post, the values should be distributed after the load starts decreasing after hitting the Max value. i.e. after row 19 and on wards
 
Upvote 0
this post is after the explanation post, i guess it is still pending for approval. please read the above post after explanation post which will appear below.
 
Upvote 0
A​
B​
C​
D​
E​
F​
G​
1​
Line
Load
Capped
Shift
Delta
Comp
2​
1​
93​
93​
0​
F2: =MIN(100 - C2, SUM(B$1:B2) - SUM(C$1:C2) - SUM(F$1:F1))
3​
2​
94​
94​
0​
4​
3​
95​
95​
0​
5​
4​
96​
96​
0​
6​
5​
97​
97​
0​
7​
6​
98​
98​
0​
8​
7​
99​
99​
0​
9​
8​
100​
100​
0​
10​
9​
101​
100​
0​
11​
10​
102​
100​
0​
12​
11​
103​
100​
0​
13​
12​
104​
100​
0​
14​
13​
105​
100​
0​
15​
14​
104​
100​
0​
16​
15​
103​
100​
0​
17​
16​
102​
100​
0​
18​
17​
101​
100​
0​
19​
18​
100​
100​
0​
20​
19​
99​
99​
1​
21​
20​
98​
98​
2​
22​
21​
97​
97​
3​
23​
22​
96​
96​
4​
24​
23​
95​
95​
5​
25​
24​
94​
94​
6​
26​
25​
93​
93​
4​
27​
26​
92​
92​
0​
28​
27​
91​
91​
0​
29​
28​
90​
90​
0​
30​
2742
2717
25
 
Upvote 0
one more question, is it possible that when the compensated load reaches the last row and it still has load to distribute then it moves to the top and starts distributing again. right now it just stops distributing even if there is still load left to distribute
Thanks in advance
 
Upvote 0
hello shg
how did you post this schedule pleaz show me
A​
B​
C​
D​
E​
F​
G​
1​
Line
Load
Capped
Shift
Delta
2​
1​
93​
93​
0​
7​
C2: =MIN(B2, 100)
3​
2​
94​
94​
0​
6​
D2: =MAX(0, B2-100)
4​
3​
95​
95​
0​
5​
E2: =MAX(0, 100-B2)
5​
4​
96​
96​
0​
4​
6​
5​
97​
97​
0​
3​
7​
6​
98​
98​
0​
2​
8​
7​
99​
99​
0​
1​
9​
8​
100​
100​
0​
0​
10​
9​
101​
100​
1​
0​
11​
10​
102​
100​
2​
0​
12​
11​
103​
100​
3​
0​
13​
12​
104​
100​
4​
0​
14​
13​
105​
100​
5​
0​
15​
14​
104​
100​
4​
0​
16​
15​
103​
100​
3​
0​
17​
16​
102​
100​
2​
0​
18​
17​
101​
100​
1​
0​
19​
18​
100​
100​
0​
0​
20​
19​
99​
99​
0​
1​
21​
20​
98​
98​
0​
2​
22​
21​
97​
97​
0​
3​
23​
22​
96​
96​
0​
4​
24​
23​
95​
95​
0​
5​
25​
24​
94​
94​
0​
6​
26​
25​
93​
93​
0​
7​
27​
26​
92​
92​
0​
8​
28​
27​
91​
91​
0​
9​
29​
28​
90​
90​
0​
10​

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,212,929
Messages
6,110,743
Members
448,295
Latest member
Uzair Tahir Khan

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