+ Reply to Thread
Results 1 to 7 of 7

Dates in Excel - If Saturday or Sunday, return Friday's date

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    34

    Dates in Excel - If Saturday or Sunday, return Friday's date

    Hello,

    I'm looking for a formula that will return the last business day of a given date.

    If the date is Saturday or Sunday, return Friday's date. If it's a business day, then return the same business day.

    For example, if I have in cell A1 the date 14/02/2015 or 15/02/2015, I'd want the formula to return 13/02/2015. If I have 13/02/2015, I'd want it to return 13/02/2015.


    Thank you very much.

    Kind regards,

    gjrr4x1

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,905

    Re: Dates in Excel - If Saturday or Sunday, return Friday's date

    If your date is in A1, try this:

    Please Login or Register  to view this content.
    Last edited by mcmahobt; 02-12-2015 at 11:44 AM.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

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

    Re: Dates in Excel - If Saturday or Sunday, return Friday's date

    With A1 is date, try:

    =LOOKUP(WEEKDAY(A1,2),{1,2,3,4,5})

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

    Re: Dates in Excel - If Saturday or Sunday, return Friday's date

    Sorry pls forget my post in #3 and replace with this one:

    =A1-WEEKDAY(A1,2)+LOOKUP(WEEKDAY(A1,2),{1,2,3,4,5})

  5. #5
    Registered User
    Join Date
    11-14-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Dates in Excel - If Saturday or Sunday, return Friday's date

    Thank you both very much.


    Kind regards,

    gjrr4x1

  6. #6
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Dates in Excel - If Saturday or Sunday, return Friday's date

    You can get the correct result by adding one day and then finding the previous working day, e.g.

    =WORKDAY(A1+1,-1)
    Audere est facere

  7. #7
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,905

    Re: Dates in Excel - If Saturday or Sunday, return Friday's date

    Quote Originally Posted by daddylonglegs View Post
    You can get the correct result by adding one day and then finding the previous working day, e.g.

    =WORKDAY(A1+1,-1)
    Great tip. TIL.

+ 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. move date to next Monday if date is on a Friday, Saturday or Sunday
    By ea223 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2014, 01:54 PM
  2. Replies: 4
    Last Post: 01-06-2014, 09:48 PM
  3. [SOLVED] Problem with settings dates for every saturday and sunday
    By Deasy in forum Excel General
    Replies: 9
    Last Post: 12-01-2013, 09:01 PM
  4. IF Statments pertaining to dates and if it lands on a Saturday or Sunday
    By RanS2011 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-22-2013, 11:30 AM
  5. identifying saturday and sunday in a date
    By mdub72 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2008, 04:23 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