+ Reply to Thread
Results 1 to 7 of 7

Saturday, Sunday or Holiday BY-PASS

Hybrid View

  1. #1
    Registered User
    Join Date
    02-25-2013
    Location
    Jacksonville
    MS-Off Ver
    Excel 2007
    Posts
    3

    Saturday, Sunday or Holiday BY-PASS

    I have a patient visitation spreadsheet. Normally, when a patient is seen a 30 day followup will be posted.
    I want to post a visit date and the next cell will display the scheduled 30 day date. No check for Saturday, Sunday or Holidays.
    I have all holidays listed in another worksheet.
    My current formula is: =IF(NOT(ISERROR(DATEVALUE(TEXT(D4,"mm/dd/yyyy")))),D4+30,"")
    What I what is to select the very next date after Saturday, Sunday or Holiday.
    Any assistance work be greatly appreciated.
    Thank you,
    Glenn
    Last edited by GPErtel; 11-15-2013 at 06:21 PM.

  2. #2
    Forum Contributor amit.wilson's Avatar
    Join Date
    07-09-2013
    Location
    Gotham
    MS-Off Ver
    Excel for Mac 2011
    Posts
    283

    Re: Saturday, Sunday or Holiday BY-PASS

    Hi GPErtel,

    welcome to the forum.

    If the date is entered as mm/dd/yyy in D4, then you could try this:
    Formula: copy to clipboard
    =IF(ISBLANK(D4),"",(D4+30+IF(OR(WEEKDAY(D4+30,2)=7,(--ISNUMBER(MATCH(D4+30,Holidays,0)))=1),1,IF(WEEKDAY(D4+30,2)=6,2,0))))


    This needs you to name range of cells with the holidays as 'Holidays".

    The current formula seems complicated. Are you trying to avoid blanks or errors? There may be a shorter formula to do that. If the date is entered as mm/dd/yyy then most of your current formula is not required.

    Let me know if it works or needs to be tweaked.

    Cheers
    <-- If you're happy & you know it...click the star.:-)

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,762

    Re: Saturday, Sunday or Holiday BY-PASS

    You can use WORKDAY function to get the next working day, so to add 30 days.....but jump forward to the next workday if that's a non working day

    =IF(COUNT(D4),WORKDAY(D4+30-1,1,Holidays),"")
    Audere est facere

  4. #4
    Registered User
    Join Date
    02-25-2013
    Location
    Jacksonville
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Saturday, Sunday or Holiday BY-PASS

    First, I thank those of you that have responded.
    Now, you know when you get close to putting the fire out, there is almost always an amber that wants to flame up. Well, the ambers were stirred and I received a completely different set of instructions.
    Here is what I (we) need...
    Patient next appointment date 30 days out, cannot exceed 30 days...
    If this date falls on a Saturday or Sunday or Holiday the appointment will be schedule the prior workday.
    Good example was given: 11/28/2013. Holiday 1s the 28th (Thu) and 29th (Fri) both on the holiday list also 30th (Sat) and 31st (Sun) weekend days.
    So if the 30 day appointment falls on Sunday it needs to fall back to the previous Friday, then check the Holiday list if it is a holiday minus one and recheck holiday list, etc...
    Saturday will work the same.
    This is much more than a simple equation... I am baffled...
    Thank you in advance, I hope with support I can come up with a solution.
    Glenn

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,762

    Re: Saturday, Sunday or Holiday BY-PASS

    You can easily adjust my suggestion - my original version gives you the 30 day appointment but goes forward to the next working day if that isn't one. To go back to the previous workday use this version

    =IF(COUNT(D4),WORKDAY(D4+30+1,-1,Holidays),"")

  6. #6
    Registered User
    Join Date
    02-25-2013
    Location
    Jacksonville
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Saturday, Sunday or Holiday BY-PASS

    Hi daddylongslegs, thanks, I don't know why was I looking so deep You surely saved the day and I am no longer afraid of spiders.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,762

    Re: Saturday, Sunday or Holiday BY-PASS

    No problem Glenn

    Quote Originally Posted by GPErtel View Post
    ....I am no longer afraid of spiders.....
    Now, the spider thing......

    In the UK a "daddylonglegs" is a slang term for a crane fly, not a spider, see discussion here

+ 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. Function to Ignore Saturday and Sunday
    By kamalthakur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2008, 11:34 AM
  2. identifying saturday and sunday in a date
    By mdub72 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2008, 04:23 PM
  3. [SOLVED] Sunday to Saturday weekly foreward planner
    By leub in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2006, 12:00 PM
  4. Replies: 2
    Last Post: 01-05-2006, 01:40 PM

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