Calculating leave days using NETWORKDAY function.

matthagon1

New Member
Joined
Apr 22, 2024
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hello

I am building a spreadsheet to calculate how much leave employees have taken. I have used this formula so far =NETWORKDAYS(start_date, end_date, [holidays]). However as some leave periods are for part of a day, I need a formula to work out a period, such as 1.5.
The working day is generally 8:30 until 16:00, would I have to work this into the formula somehow?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I'm not sure a networkdays formula will work for your scenario. That function counts days and not portions of days.
Can you provide some data and maybe the forum can provide you with a way to do your task. Please post data as a table or use the xl2bb add in (link below ).
Also provide some examples with expected outcomes.
 
Upvote 0
1- Using NETWORKDAYS to count full days first (i.e, 5)
2- Then, minus portion days.
i.e, last day, end hour is 12 PM
result should be =5-(12-8.5)/7.5
 
Upvote 0
I'm not sure a networkdays formula will work for your scenario. That function counts days and not portions of days.
Can you provide some data and maybe the forum can provide you with a way to do your task. Please post data as a table or use the xl2bb add in (link below ).
Also provide some examples with expected outcomes.
Thank you @awoohaw i appreciate your reply. I will get a sample spreadsheet loaded up so you can see what i mean.
 
Upvote 0
Start Date / TimeEnd TimeShould be
9/26/2024 8:00:009/27/2024 16:00:002
12/1/2024 8:00:0012/6/2024 16:00:005
9/27/2024 8:00:009/28/2024 12:00:0011.5
5/21/2024 8:00:005/26/2024 12:00:0043.5
Holidays
5/24/2024
5/25/2024

This is the data that i am using, with a column stating what the outcome should be.
 
Upvote 0
are the partial day times only on the first or last day?
 
Upvote 0
also, are you wanting to exclude weekend days, if so which days define your weekend?
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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