+ Reply to Thread
Results 1 to 14 of 14

date not include sunday,saturday and not include red date in tabel

  1. #1
    Registered User
    Join Date
    07-19-2019
    Location
    indonesia
    MS-Off Ver
    2016 64 bitt
    Posts
    9

    date not include sunday,saturday and not include red date in tabel

    I Want formula with last date every month but not include sunday and saturday and not include date in col C (red date)
    this is my formula but while change date in col C (red date) ,result not changed
    Please Login or Register  to view this content.
    wawa.png
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: date not include sunday,saturday and not include red date in tabel

    Please try at D5
    =WORKDAY(D5+1,-1,$C$5:$C$15)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-19-2019
    Location
    indonesia
    MS-Off Ver
    2016 64 bitt
    Posts
    9

    Re: date not include sunday,saturday and not include red date in tabel

    Bo_ry i want formula in col D without helper column thank
    find last date and not include sunday ,saturday and not include red date
    that is imposibel

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,756

    Re: date not include sunday,saturday and not include red date in tabel

    Welcome to the forum.

    What should happen if the end of the month is a weekend or holiday?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,756

    Re: date not include sunday,saturday and not include red date in tabel

    In D4 copied down:

    =WORKDAY(EOMONTH(DATE(2019,1,1),ROWS(D$5:D5)-1)+1,-1,$C$5:$C$15)

    Excel 2016 (Windows) 32 bit
    C
    D
    E
    3
    RESULT USING FORMULA
    4
    RED DATE
    LAST DATE
    CHEK DATE
    5
    31/01/2019
    30/01/2019
    Wednesday
    6
    05/02/2019
    28/02/2019
    Thursday
    7
    07/03/2019
    29/03/2019
    Friday
    8
    03/04/2019
    30/04/2019
    Tuesday
    9
    19/04/2019
    31/05/2019
    Friday
    10
    01/05/2019
    28/06/2019
    Friday
    11
    25/05/2019
    31/07/2019
    Wednesday
    12
    01/06/2019
    30/08/2019
    Friday
    13
    05/06/2019
    30/09/2019
    Monday
    14
    06/06/2019
    31/10/2019
    Thursday
    15
    25/12/2019
    29/11/2019
    Friday
    16
    31/12/2019
    Tuesday
    Sheet: Sheet1
    Last edited by AliGW; 07-19-2019 at 11:25 AM.

  6. #6
    Registered User
    Join Date
    07-19-2019
    Location
    indonesia
    MS-Off Ver
    2016 64 bitt
    Posts
    9

    Re: date not include sunday,saturday and not include red date in tabel

    thank you AliGW example last date in month(12) = 31/12/2019
    first : chek if 31/12/2019 not match (not include) with red date (col c)
    second : if 31/12/2019 not match with red date and 31/12/2019 not sunday or saturday then result is 31/12/2019
    but if =31/12/2019 equal to red date(col (c)) then last date become 31-12-2019 = 30/12/2019 and then chek again to second step not sunday or saturday
    30/12/2019= Saturday then 30-12-2019 become 29-12-2019
    or if 30/12/2019 is sunday then reduced 30-12-2019 - 2 (day) = 28-12-2019
    if 28-12-2019 not sunday and not saturday and not include in red date then 28-12-2019 is last date in month(12)

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: date not include sunday,saturday and not include red date in tabel

    Please forgive me.
    Could you please kindly try again at D5

    =WORKDAY(EOMONTH("1/1/19",ROWS(D$5:D5)-1)+1,-1,$C$5:$C$15)
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,756

    Re: date not include sunday,saturday and not include red date in tabel

    Did you try my suggestion? In what way does it NOT do what you have requested?

  9. #9
    Registered User
    Join Date
    07-19-2019
    Location
    indonesia
    MS-Off Ver
    2016 64 bitt
    Posts
    9

    Re: date not include sunday,saturday and not include red date in tabel

    oh thankyou Bo_ry is great and Ferpect
    can you explain why is -1
    =WORKDAY(EOMONTH("1/1/19",ROWS(D$5:D5)-1)+1,-1,$C$5:$C$15)

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,756

    Re: date not include sunday,saturday and not include red date in tabel

    Did you even look at post #5???

    By adding a day and then looking at the day before that (+1,-1,) you are coercing Excel to judge whether the date in D4 fits the criteria. One balances out the other. If you try to do it with a 0, Excel fails to work it out correctly because there is no date range.
    Last edited by AliGW; 07-19-2019 at 11:41 AM.

  11. #11
    Registered User
    Join Date
    07-19-2019
    Location
    indonesia
    MS-Off Ver
    2016 64 bitt
    Posts
    9

    Re: date not include sunday,saturday and not include red date in tabel

    i am sorri Aligw ,i am has tes and perfecto
    thankyou can you explain me
    =WORKDAY(EOMONTH(DATE(2019,1,1),ROWS(D$5:D5)-1)+1,-1,$C$5:$C$15)
    what mean -1

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,756

    Re: date not include sunday,saturday and not include red date in tabel

    See post #10.

  13. #13
    Registered User
    Join Date
    07-19-2019
    Location
    indonesia
    MS-Off Ver
    2016 64 bitt
    Posts
    9

    Re: date not include sunday,saturday and not include red date in tabel

    ok thankyou aliWg and Bo_Ry case is solved

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,756

    Re: date not include sunday,saturday and not include red date in tabel

    Fab - thanks for letting us know.

+ 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] Subtract the first Saturday and or Sunday of a date range
    By Nunzio in forum Excel General
    Replies: 0
    Last Post: 02-22-2017, 08:57 PM
  2. [SOLVED] Change Saturday or Sunday to Monday by date
    By pfulghum in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-05-2016, 09:30 AM
  3. 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
  4. finding date different between two collumn except saturday and sunday
    By sathiyamoorthy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2013, 02:45 AM
  5. date function which did not include sunday
    By Harrold in forum Excel General
    Replies: 12
    Last Post: 11-03-2011, 12:06 PM
  6. Date formula plus 1 day advance not include sunday.
    By choy96 in forum Excel General
    Replies: 1
    Last Post: 02-20-2011, 05:49 AM
  7. 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