+ Reply to Thread
Results 1 to 6 of 6

Formula to get the weekday date

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Formula to get the weekday date

    Hello:

    Please refer to attached file.
    I need formula in D8 which will give the date close to 14th but need to make sure that it is weekdays.
    In the example:
    If I select month 1 (Jan) in cell A1, the 14th is Sat, answer i need in cell D8 will be 2/13/2017
    If I select month 2 (Feb) in cell A1, the 14th is Tue, answer i need in cell D8 will be 2/14/2017
    If I select month 9 (Sep) in cell A1, the 14th is Tue, answer i need in cell D8 will be 9/14/2017

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula to get the weekday date

    Hi there.

    use this for the NEAREST working day to the 14th:

    =IF(WEEKDAY(A8+13)=7,A8-1+13,IF(WEEKDAY(A8+13)=1,A8+1+13,A8+13))

    In the sheet, I amended (slightly) the formula you used to get the first of each month (your formula returned a bit of text for the first date...) and have also given you formulae for the NEXT and PREVIOUS working days after the 14th.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Formula to get the weekday date

    Please Login or Register  to view this content.


    Kind regards
    Leo
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to get the weekday date

    Hello:

    Thanks Glenn and LeoTaxi..

    Riz

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula to get the weekday date

    Another way..

    =IF(WEEKDAY(A21+1)>2,A21,A21-(WEEKDAY(A21+1)))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Formula to get the weekday date

    Try this ...


    =DATE(2017,$A$1,15)-LOOKUP(WEEKDAY(DATE(2017,$A$1,15),2),{1;2;7},{0;1;2})

    Or:

    =WORKDAY(DATE(2017,$A$1,15),-(WEEKDAY(DATE(2017,$A$1,15))<>2))

+ 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. Excel VBA code to return weekday name from a date then autofilters for userdefined weekday
    By studyengineering in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2016, 03:24 PM
  2. [SOLVED] Calculate weekday end date based on sum of weekday start date and cell value
    By Rerock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2014, 09:17 AM
  3. [SOLVED] weekday() result used in an array formula doesn't work. Formula works if i type in date
    By aarco50 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-25-2014, 03:25 PM
  4. Array Formula with Month, Date and Weekday - Breaking down
    By Alienontherun in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-27-2013, 04:56 AM
  5. [SOLVED] Need help w/formula to find to the next weekday (Tuesday) after 7 years from specific date
    By sfmauldin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-04-2012, 08:17 PM
  6. Formula to calculate date from, weekday-weeknumber-year
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-16-2012, 06:59 PM
  7. Formula to generate date of weekday (e.g. Monday) of given week
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-19-2011, 07:53 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