NETWORKDAY formula - calculating a half paid day off

Sally Wico
Sally Wico ✭✭✭
edited 10/02/24 in Formulas and Functions

I have a Paid Time Off (PTO) tracker in Smartsheet which utilizes the NETWORKDAY formula so the paid holidays won't affect the employee's PTO allotment.

NETWORKDAY([Start Date of PTO]@row, [Last Date of PTO]@row, DATE(2024, 1, 1), DATE(2024, 1, 15), DATE(2024, 5, 27), DATE(2024, 7, 4), DATE(2024, 9, 2), DATE(2024, 11, 28), DATE(2024, 12, 24), DATE(2024, 12, 25), DATE(2024, 12, 31)

Here's where I give up (go ahead and chuckle if it's super simple 😊): New Year's Eve (12/31) is only a HALF paid day. How do I get this formula to calculate the "DATE(2024, 12, 31)" portion of it as a half day (.5)?

If this screenshot doesn't help, please disregard (it is one out of dozens of failed attempts to manipulate it into doing what I want).

Thank you!

Best Answer

  • dojones
    dojones ✭✭✭✭✭
    Answer ✓

    If 12/31 is the only day of concern, you could create a formula under PTO (Add Days Back, Subtract from Avail) which would yield 0.5 when days cover 12/31

    Put this formula under PTO Add Back

    =IF(AND([Start Date of PTO]@row <= DATE(2024, 12, 31), [End Date of PTO]@row >= DATE(2024, 12, 31)), 0.5, "")

    Then just subtract the result from the PTO Days Requested in Adjust PTO Days column

Answers

  • dojones
    dojones ✭✭✭✭✭
    Answer ✓

    If 12/31 is the only day of concern, you could create a formula under PTO (Add Days Back, Subtract from Avail) which would yield 0.5 when days cover 12/31

    Put this formula under PTO Add Back

    =IF(AND([Start Date of PTO]@row <= DATE(2024, 12, 31), [End Date of PTO]@row >= DATE(2024, 12, 31)), 0.5, "")

    Then just subtract the result from the PTO Days Requested in Adjust PTO Days column

  • Sally Wico
    Sally Wico ✭✭✭

    Thank you!!!! 😊

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!