Automatically populate cells

KFrank

New Member
Joined
May 24, 2020
Messages
4
Office Version
  1. 2007
Platform
  1. Windows
Hello all. I am trying to put a sheet together to calculate my working hours and how many hours I have left.
The company I work for assigns us with 2239 hours to work in a year. We are issued with 248 hours of holidays per year which reduces the hours needed to work to 1991 (at times some hours are carried over, etc which could increase the hours, but this is easy to calculate.

As per the example below, we work 4 days for 12.3 hours per day (the green highlighted cells) and then have 4 days off. Each 12.3 hours day reduces the total amount of hours left by 12.3 hours. My end goal with the sheet below is to calculate when I will finish (as well as keep track of hours worked, etc.)

When other people need to take leave, I am able to work a cover shift for them which would reduce my hours by 12.3 - this is planned in advance. This is shown as CVR.
When somebody calls in sick, I am able to work a short-notice call back for them which would reduce my hours by 18.3. This is shown as CB.
If I use holiday hours, this would reduce my holiday hour total and thus extend my finish date. This is shown as PAL.

What I am asking for help with is this - I want the range below to populate with the green 12.3 cells on the days that I am scheduled to work until my Hours Remaining is at zero. In the example below, I would finish all 12.3 hour shifts on the 11th June 2021 and have to work 10.7 hours on the 12th June 2021 but if I were to take away all of the CB or CVR cells, I would like the sheet to add more 12.3 hours shifts as required to show how many days I would need to work. As I add more CVR or CB or PAL cells, I'd like the amount of 12.3 cells to reduce.

How high is the mountain I am trying to climb?

Thanks in advance.

Hours.jpg
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Based on your post, you have CVR, CB, or PAL in the cells. They are color coded, but there are no hour in the cell. I don't think you can add them up. You can keep the color code and have a legend on the bottom, but you have to enter hours to those color coded cells.

I thought of a solution, but I don't know if it will work for you. You need to add 3 columns to the right side. They are total hours work, accumulative total hours work, and hours left.

The total hours work will be the total for the entire row. Accumulative total hours is the running total of your work hours. Hours left is the remaining number of hours you need to work. You can set up a conditional formatting for the "hours left" column. It is to alert you , let's say, you have 120 hours to work before you hit the max of 2,239.

ABCD
pay period
ending date
Total hours work
per pay period
Accumulative
Total hours work
Hours leftcolumn C
formula
column D
formula
2,239.00​
7/25/2020​
98.4​
98.40​
2,140.60​
=SUM(B$6:B6)=$D$5-C6
8/8/2020​
98.4​
196.80​
2,042.20​
8/22/2020​
98.4​
295.20​
1,943.80​
9/5/2020​
98.4​
393.60​
1,845.40​
9/19/2020​
98.4​
492.00​
1,747.00​
10/3/2020​
98.4​
590.40​
1,648.60​
10/17/2020​
98.4​
688.80​
1,550.20​
10/31/2020​
98.4​
787.20​
1,451.80​
11/14/2020​
98.4​
885.60​
1,353.40​
11/28/2020​
98.4​
984.00​
1,255.00​
12/12/2020​
98.4​
1,082.40​
1,156.60​
12/26/2020​
98.4​
1,180.80​
1,058.20​
1/9/2021​
98.4​
1,279.20​
959.80​
1/23/2021​
98.4​
1,377.60​
861.40​
2/6/2021​
98.4​
1,476.00​
763.00​
2/20/2021​
98.4​
1,574.40​
664.60​
3/6/2021​
98.4​
1,672.80​
566.20​
3/20/2021​
98.4​
1,771.20​
467.80​
4/3/2021​
98.4​
1,869.60​
369.40​
4/17/2021​
98.4​
1,968.00​
271.00​
5/1/2021​
98.4​
2,066.40​
172.60​
5/15/2021​
98.4​
2,164.80​
74.20​
5/29/2021​
98.4​
2,263.20​
-24.20​
6/12/2021​
98.4​
2,361.60​
-122.60​
6/26/2021​
98.4​
2,460.00​
-221.00​
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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