Annual Leaver Tracker

samleighcattrall

New Member
Joined
Oct 13, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to make an annual leave tracker for my partner, which displays the following things.

Total Annual Leave
Annual Leave Taken(Historic)
Annual Leave Taken(Future Dates)
Annual Leave Used.

The issue I am finding, is that because her annual leave is calculated in hours, like many people I am sure, however each day of the week has a different allocation of hours. This is due to the length of the shift allocated to those days. The allocation of hours are as follows.

Monday/Tuesday - 8 Hours per day
Wednesday-Sunday - 9 hours per day.

I intend to go with a simple, Start date and End date in columns A and B, and use column C to calculate the hours. However the calcuation would have to identify the days included and between columns A and B, based on the hours stated above.

Any help would be much appreciated.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
MrExcelPlayground13.xlsx
ABCDEFG
1menuholidays
2Start DateEnd Date1/1/2022
35/1/20225/1/20229181/15/2022
46/3/20226/4/202218285/30/2022
59/1/20229/12/202296397/4/2022
611/20/202211/30/202277499/3/2022
75911/11/2022
86911/24/2022
97911/25/2022
1012/25/2022
Sheet3
Cell Formulas
RangeFormula
C3:C6C3=LET(a,(SEQUENCE(B3-A3+1,1,A3)),c,ISNA(MATCH(a,$G$2:$G$10,0)),d,FILTER(a,c),b,XLOOKUP(WEEKDAY(d,11),$D$3:$D$9,$E$3:$E$9,,0),SUM(b))
 
Upvote 0
Solution
MrExcelPlayground13.xlsx
ABCDEFG
1menuholidays
2Start DateEnd Date1/1/2022
35/1/20225/1/20229181/15/2022
46/3/20226/4/202218285/30/2022
59/1/20229/12/202296397/4/2022
611/20/202211/30/202277499/3/2022
75911/11/2022
86911/24/2022
97911/25/2022
1012/25/2022
Sheet3
Cell Formulas
RangeFormula
C3:C6C3=LET(a,(SEQUENCE(B3-A3+1,1,A3)),c,ISNA(MATCH(a,$G$2:$G$10,0)),d,F
Thank you so much for the speedy reply. This is exactly what I needed.
 
Upvote 0
MrExcelPlayground13.xlsx
ABCDEFG
1menuholidays
2Start DateEnd Date1/1/2022
35/1/20225/1/20229181/15/2022
46/3/20226/4/202218285/30/2022
59/1/20229/12/202296397/4/2022
611/20/202211/30/202277499/3/2022
75911/11/2022
86911/24/2022
97911/25/2022
1012/25/2022
Sheet3
Cell Formulas
RangeFormula
C3:C6C3=LET(a,(SEQUENCE(B3-A3+1,1,A3)),c,ISNA(MATCH(a,$G$2:$G$10,0)),d,FILTER(a,c),b,XLOOKUP(WEEKDAY(d,11),$D$3:$D$9,$E$3:$E$9,,0),SUM(b))
Only issue I have found, is when i've pulled this formula down to cover multiple cells in column C, if there is no data in columns in A/B it will populate "9" in the cells in column C. If you have a fix for this, that would be appreciated, otherwise I will drag the formula down when required. Thank you
 
Upvote 0
MrExcelPlayground13.xlsx
ABCDEFGHI
1menuholidays
2Start DateEnd Date1/1/2022
35/1/20225/1/20229181/15/20229
46/3/20226/4/202218285/30/202218
59/1/20229/12/202296397/4/202296
611/20/202211/30/202277499/3/202277
7 5911/11/2022
8 6911/24/2022
9 7911/25/2022
10 12/25/2022
Sheet3
Cell Formulas
RangeFormula
I3:I6I3=LET(a,(SEQUENCE(B3-A3+1,1,A3)),c,ISNA(MATCH(a,$G$2:$G$10,0)),d,FILTER(a,c),b,XLOOKUP(WEEKDAY(d,11),$D$3:$D$9,$E$3:$E$9,,0),SUM(b))
C3:C10C3=IF(A3<>"",LET(a,(SEQUENCE(B3-A3+1,1,A3)),c,ISNA(MATCH(a,$G$2:$G$10,0)),d,FILTER(a,c),b,XLOOKUP(WEEKDAY(d,11),$D$3:$D$9,$E$3:$E$9,,0),SUM(b)),"")
 
Upvote 0

Forum statistics

Threads
1,223,947
Messages
6,175,559
Members
452,652
Latest member
eduedu

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