Calculating future time off based on an entered date

NKBingham

New Member
Joined
Sep 4, 2008
Messages
11
Office Version
  1. 365
Platform
  1. Windows
I'm trying to find a way that I can auto calculate how much PTO would be available at the date of one's latest date of PTO in column B based on a given date. For example; it's January 8, 2023 today and I've earned my first 8.65 hours of PTO. I've used 1 hour on the 6th, so I know I'll have 7.65 hours left and my sheet automatically calculates that and puts the info into cells D5 and E5 respectively. But I also need to be able to show how much PTO I'll have earned at a given future date (E2) minus all PTO I've taken or plan to take up until that specific date. To clarify, my sheet shows 1 hour on 2/6/23 and one on 3/30/23, but I want to know only information up to 2/7/23 for instance. It sounds like it should be easy, but I can't seem to wrap my head around what I need to do.
 

Attachments

  • stress.JPG
    stress.JPG
    150.6 KB · Views: 12
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi. I have some assumptions for some formulas that may help in the below.

Used to Date(cell C5): uses a sumif formula to count hours only if the associated date is less than or equal to date in cell C2

Anticipated Remaining (cell C8): uses a lookup formula based on the date in E2 and the data in columns H:J (beginning on row 10). Then removes the Used to Date amount from cell D5.

Future Scheduled (cell D8): uses similar sumif formula from cell C5, this time summing the hours with dates greater than the date in cell C2

Book1
BCDEFGHIJ
12023PTO Tracker
2Today:1/8/20232/7/2023
3
4PTOAccrued to DateUsed to DateCurrent Balance
58.6517.65
6
7Anticipated RemainingFuture Scheduled Thru 2/7/23Balance
824.95222.95
9
10DateHoursPay Period EndingPay DateSum of Earned PTO by week
111/6/202311/8/20231/13/20238.65
122/6/202311/22/20231/27/202317.3
133/30/202312/5/20232/10/202325.95
142/19/20232/24/202334.6
153/5/20233/10/202343.25
163/19/20233/24/202351.9
174/2/20234/7/202360.55
Sheet3
Cell Formulas
RangeFormula
D5D5=SUMIF($B$11:$B$33,"<="&C2,$C$11:$C$33)
E5,E8E5=C5-D5
D7D7="Future Scheduled Thru " &TEXT(E2,"m/d/yy")
C8C8=LOOKUP(E2,$H$11:$I$36,$J$11:$J$36)-D5
D8D8=SUMIF($B$11:$B$33,">"&C2,$C$11:$C$33)
J11J11=C5
H12:I17H12=H11+14
J12:J17J12=$C$5+J11
 
Upvote 0
Solution
Hi. I have some assumptions for some formulas that may help in the below.

Used to Date(cell C5): uses a sumif formula to count hours only if the associated date is less than or equal to date in cell C2

Anticipated Remaining (cell C8): uses a lookup formula based on the date in E2 and the data in columns H:J (beginning on row 10). Then removes the Used to Date amount from cell D5.

Future Scheduled (cell D8): uses similar sumif formula from cell C5, this time summing the hours with dates greater than the date in cell C2

Book1
BCDEFGHIJ
12023PTO Tracker
2Today:1/8/20232/7/2023
3
4PTOAccrued to DateUsed to DateCurrent Balance
58.6517.65
6
7Anticipated RemainingFuture Scheduled Thru 2/7/23Balance
824.95222.95
9
10DateHoursPay Period EndingPay DateSum of Earned PTO by week
111/6/202311/8/20231/13/20238.65
122/6/202311/22/20231/27/202317.3
133/30/202312/5/20232/10/202325.95
142/19/20232/24/202334.6
153/5/20233/10/202343.25
163/19/20233/24/202351.9
174/2/20234/7/202360.55
Sheet3
Cell Formulas
RangeFormula
D5D5=SUMIF($B$11:$B$33,"<="&C2,$C$11:$C$33)
E5,E8E5=C5-D5
D7D7="Future Scheduled Thru " &TEXT(E2,"m/d/yy")
C8C8=LOOKUP(E2,$H$11:$I$36,$J$11:$J$36)-D5
D8D8=SUMIF($B$11:$B$33,">"&C2,$C$11:$C$33)
J11J11=C5
H12:I17H12=H11+14
J12:J17J12=$C$5+J11
This is perfect. Thank you so much for your help!
 
Upvote 0

Forum statistics

Threads
1,215,675
Messages
6,126,153
Members
449,294
Latest member
Jitesh_Sharma

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