+ Reply to Thread
Results 1 to 6 of 6

Deduct Partial Vacation Hours Taken from a Date or Date Range

  1. #1
    Forum Contributor
    Join Date
    02-20-2011
    Location
    Candada
    MS-Off Ver
    Microsoft Office 365
    Posts
    174

    Question Deduct Partial Vacation Hours Taken from a Date or Date Range

    Before anything else, I want to thank everyone who contributes to Excelforum.com, especially those who help me on a daily basis. I’ve created an excel file where I can track vacation days or vacation hours taken by an employee. However, I’d like to know if there is a way to deduct partial hours taken by an employee from a specific date or date range excluding weekends and holidays. For instance an employee may opt to take 4 hours of vacation instead of the 8 hours. In the Accrual Balance and Vacation Records Excel file, there is a tab named “Vacation_Records” in which contains a column named “HoursTaken”. I'm able to count days taken by an employee from a date or date range excluding weekends and holidays, but is there a formula to simply deduct partial hours?
    Again thank you very much for your time and dedication.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-20-2011
    Location
    Candada
    MS-Off Ver
    Microsoft Office 365
    Posts
    174

    Re: Deduct Partial Vacation Hours Taken from a Date or Date Range

    Does anyone has an idea how I can accomplish this task? Thank you again for your valuable time.

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Deduct Partial Vacation Hours Taken from a Date or Date Range

    Hi,
    here is a formula that will take hours into account:
    Please Login or Register  to view this content.
    Remember to press "CTRL" + "SHIFT" + Enter when you copy this formula to make it an ARRAY formula.

    Here I assume that a partial day vacation is taken within the same day so you can enter the start hour and end hour of this vacation. The formula will not work if you enter hours in a vacation longer than a day.
    Hours are calculated based on an 8 hors shift, so 4 hours is 0.5 day.
    If a long vacation is started 4 hours before the actual day (early leave), you will have to enter this on 2 rows. One for the hours and the other for the days.
    Hope this helps.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  4. #4
    Forum Contributor
    Join Date
    02-20-2011
    Location
    Candada
    MS-Off Ver
    Microsoft Office 365
    Posts
    174

    Re: Deduct Partial Vacation Hours Taken from a Date or Date Range

    Pierre Leclerc,
    I went and created a new file based on your provided formula and added new columns from I to L. However, after testing your formula, I noticed when I filled down the formula down column K, I get 1 if there is no time in column I and J. Also, when I deducted 8 hours from Start Hour and End Hour, I get 1 in column K. If, for example, I add all the hours for Kathy Johnson, I should get 78 hours taken and not 67.5.
    I wonder if I am doing it correctly. Please take a look at the new attached file and let me know what I am doing wrong.
    Again,
    Thank you very much for helping me with this task.
    Attached Files Attached Files

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Deduct Partial Vacation Hours Taken from a Date or Date Range

    Look at the attached file.
    you don't have to add new columns. The formula look at your column C and D dates and calculate the days or hours of vacation taken.
    The only difference between the 2 (days or hours) is that you enter a date with a time as a start and end date for a person taking partial day vacation.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-20-2011
    Location
    Candada
    MS-Off Ver
    Microsoft Office 365
    Posts
    174

    Re: Deduct Partial Vacation Hours Taken from a Date or Date Range

    Mr. Pierre Leclerc, I am very very impressed with your work and knowledge. You are right! I don't need new columns to complete that task. Thank you very much. I don't have enough words to say.
    Sincerely,
    Kimston

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1