+ Reply to Thread
Results 1 to 8 of 8

Lieu day off for a holiday on weekend

  1. #1
    Registered User
    Join Date
    11-29-2022
    Location
    Calgary, Canada
    MS-Off Ver
    MS 365
    Posts
    4

    Lieu day off for a holiday on weekend

    How can a lieu/alternate date for Stat holidays that fall on a weekend be calculated? For example, in 2023, January 1st falls on Sunday and Nov 11th falls on Saturday. If a holiday is on Sunday, it needs to add 1 day and if it's on a Saturday, it needs to add 2 days. Here's my two novice unsuccessful attempts at this formula where D14 is the stat holiday date:

    =IF(WEEKDAY($D14,2)=7,$D14+1)=IF(WEEKDAY($D14,2)=6,$D14+2)
    This returns True if it's a weekday and False if it's a weekend but I want it to return the new date if it's on a weekEND and the same date if it's on a weekDAY.

    =IF(WEEKDAY($D14,2)>5),WORKDAY($D14,2)
    This alternative option is not working at all.

    Thanks in advance for your help.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Lieu day off for a holiday on weekend

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!

  3. #3
    Registered User
    Join Date
    11-29-2022
    Location
    Calgary, Canada
    MS-Off Ver
    MS 365
    Posts
    4

    Smile Re: Lieu day off for a holiday on weekend

    That worked! Thank YOU so much!

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Lieu day off for a holiday on weekend

    Why not WORKDAY? Not only weekends, but also holidays are excluded.
    The tip here is stepping back 1 day, then forwarding 1 day, the new date will exclude weekends and holidays.
    Please Login or Register  to view this content.
    With C14:C20, for example, is holidays range.
    Quang PT

  5. #5
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Lieu day off for a holiday on weekend

    You're welcome. Glad to help.
    Thank you for the feedback and for the reputation added.
    Have a blessed day!

  6. #6
    Registered User
    Join Date
    11-29-2022
    Location
    Calgary, Canada
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Lieu day off for a holiday on weekend

    Thanks for replying Bebo. However, that solution only works if the holiday falls on a weekend. If the holiday falls on a weekday, it results in a wrong future date.
    In my above alternate option, I was trying to use next workday if the holiday date was on a weekend, but the formula I wrote was not functional.

  7. #7
    Registered User
    Join Date
    11-29-2022
    Location
    Calgary, Canada
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Lieu day off for a holiday on weekend

    The alternate formula that also works now is:
    =IF(WEEKDAY($D14,2)>5,WORKDAY($D14,1),$D14)
    Thank you so much for helping out a nurse that's trying to create a customized team vacation calendar. So generous of you to share your expertise.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Lieu day off for a holiday on weekend

    So holidays will be ignored? just remove it.
    try:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Networkdays counting weekend/holiday
    By viperexp87 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-11-2020, 06:56 PM
  2. [SOLVED] Formula to add days with holiday & weekend
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2019, 04:29 AM
  3. [SOLVED] Weekend and Holiday Exclusion From Count
    By Winship in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-04-2017, 05:25 PM
  4. [SOLVED] Long Weekend Formula for Holiday
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-27-2015, 04:30 AM
  5. Weekend and Holiday analysis with Time
    By leenie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2014, 12:46 PM
  6. how to sum day if it falls in a weekend or holiday?
    By jgomez in forum Access Tables & Databases
    Replies: 2
    Last Post: 11-30-2011, 01:54 PM
  7. Time difference - without weekend/holiday
    By blizard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-08-2005, 03:14 PM

Tags for this Thread

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