Spreading numbers to an hourly schedule

user19800

New Member
Joined
Oct 29, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Good evening, all! I'm a new user to VBA with a complicated question.

I have a delivery schedule sheet where a daily delivery schedule number gets spread to an hourly schedule at the begging of the day. For the hours 11 to 20 the D columns gets multiplied by 0.03167. The hours 21 and 8 get multiplied by 0.04168 and hours 22-7 and 9-10 get multiplied by 0.05. The Delivery schedule can be changed at any time of the day (multiple times). If a new delivery schedule is entered (J2) the new value is spread only to the remainder of the hours, starting with the effective hour, as specified by the user. The user enters the effective hour for the spreading in (J1)

For example, if the daily schedule was set to 1400 then each hour would be spread based on the above formulas. If the schedule was revised to 1700 at 5:00 the additional 696 would be spread across the remaining 6 hours.

Currently the revised schedule column (E) is manually entered. Would it be possible to automate column E ? Thanks so much in advance!

SchedulePattern.xlsx
CDEFGHIJ
1TimeTotal scheduled Delivery (original)Revised ScheduleActualsVAREffective Hour 5:00
2 14001700New Delivery Schedule 1700
311:004444506Revised - Delivered696
412:004444506
513:004444506
614:0044445410
715:004444484
816:004444484
917:004444484
1018:004444484
1119:004444484
1220:004444484
1321:0058716810
1422:00707068-2
1523:00707068-2
160:00707068-2
171:00707068-2
182:00707068-2
193:00707068-2
204:00707068-2
215:007011612046
226:007011612046
237:007011612046
248:005811612058
259:007011610046
2610:007011610046
27140017001716
Summer
Cell Formulas
RangeFormula
E2E2=J2
D3:E12D3=$D$2*0.03167
D13:E13D13=D2*0.04168
D21:D23,D14:E20D14=$D$2*0.05
E21:E26E21=$J$3/6
D24D24=D2*0.04168
D25D25=D2*0.05
D26D26=D2*0.05
J3J3=E2-(SUM(E3:E20))
G3:G20G3=F3-D3
G21:G26G21=E21-D21
D27:F27D27=SUM(D3:D26)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,515
Messages
6,119,974
Members
448,934
Latest member
audette89

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