+ Reply to Thread
Results 1 to 11 of 11

IF weekday then > If Saturday then...

  1. #1
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    IF weekday then > If Saturday then...

    Me again...

    To simplify it, I am stuck on a formula that states:

    IF A6 is a weekday then 1, IF A6 is a Saturday, then 2, IF A6 is a Sunday, then ""

    Thanks BVG
    Last edited by Badvgood; 03-27-2020 at 12:06 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF weekday then > If Saturday then...

    Hi BVG,

    How about >> =IF(OR(TEXT(A6,"ddd")={"Sat","Sun"}),2,1)
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: IF weekday then > If Saturday then...

    Thanks but this still displays Saturdays and Sundays both as 2, it fails to display Sundays as 0 zero or blank.

    Thanks BVG
    Last edited by jeffreybrown; 03-27-2020 at 11:43 AM. Reason: Please don't quote whole posts!

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF weekday then > If Saturday then...

    Please Login or Register  to view this content.
    Maybe you need to elaborate on this even more. "then what"

  5. #5
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: IF weekday then > If Saturday then...

    Sure, then either blank "" or zero etc would be perfect.

    Thank you for assisting.

    Kind regards, BVG
    Last edited by jeffreybrown; 03-27-2020 at 11:42 AM. Reason: Please don't quote whole posts!

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF weekday then > If Saturday then...

    =IF(TEXT(A6,"ddd")="Sat",2,IF(TEXT(A6,"ddd")="Sun",0,1))

  7. #7
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: IF weekday then > If Saturday then...

    Quote Originally Posted by jeffreybrown View Post
    =IF(TEXT(A6,"ddd")="Sat",2,IF(TEXT(A6,"ddd")="Sun",0,1))
    Thank you very much. I can now deconstruct it to make it suitable for my exact purpose.

    Kind regards and stay safe.

    BVG

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF weekday then > If Saturday then...

    You are very welcome BVG and thanks for the feedback.

  9. #9
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: IF weekday then > If Saturday then...

    Quote Originally Posted by jeffreybrown View Post
    You are very welcome BVG and thanks for the feedback.
    Sorry to be a pain but I have noticed an error in what I was requesting, well rather I did not consider the possibility of how it would handle cells that did not contain a date.

    As I copy the formula down, when it gets to a cell that is sometimes populated with a date and sometimes it is not, I get the result of 1, which of course is for a weekday.

    I need it to return blank zero nothing.

    Thanks again,

    BVG

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF weekday then > If Saturday then...

    How about

    =IF(N(A6),IF(TEXT(A6,"ddd")="Sat",2,IF(TEXT(A6,"ddd")="Sun",0,1)),"")

  11. #11
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: IF weekday then > If Saturday then...

    Administrative Note:

    Please don't quote entire posts unnecessarily. They clutter threads and make them hard to read.
    Use the "Quick reply" instead
    Thanks

+ 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] Move Saturday hours into weekday cells
    By y_not in forum Excel General
    Replies: 6
    Last Post: 07-31-2019, 12:24 PM
  2. 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
  3. [SOLVED] Check If Today is Saturday. If Saturday, Execute Macro
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2014, 09:07 AM
  4. [SOLVED] Using CHOOSE and WEEKDAY to Display Wednesday and Saturday Dates With Time
    By wtierce in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-25-2013, 11:34 AM
  5. Replies: 14
    Last Post: 07-24-2013, 06:08 PM
  6. Weekday default to blank and not Saturday?
    By Legs in forum Excel General
    Replies: 4
    Last Post: 03-02-2011, 11:12 AM
  7. Replies: 11
    Last Post: 09-19-2005, 08:15 AM

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