+ Reply to Thread
Results 1 to 13 of 13

Conditional Formatting: Weekend Dates

  1. #1
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Conditional Formatting: Weekend Dates

    Hi, I have a number of columns that contain random dates (2017 & 2018), is there a way that I conditionally format the columns so that weekend dates that have passed can be highlighted?

    Cheers

  2. #2
    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,780

    Re: Conditional Formatting: Weekend Dates

    Your CF rule will be like this:

    =AND(WEEKDAY(A1,2) > 5,A1 < TODAY())

    The cell reference needs to be the first cell containing a date in the range, then set the range in the Applies To box.
    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.

  3. #3
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Re: Conditional Formatting: Weekend Dates

    Brilliant - thank you very much.

  4. #4
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Re: Conditional Formatting: Weekend Dates

    Sorry Ali, do you know if there's a way that only weekend dates that have passed are highlighted? Your formula works brilliantly, however it does highlight weekend dates that are in the future??

    Cheers

  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,780

    Re: Conditional Formatting: Weekend Dates

    It shouldn't do, as the criteria include for the date to be earlier than today. Please attach a sample workbook for me to troubleshoot.


    =AND

    Highlight cells meeting both conditions.

    (WEEKDAY(A1,2) > 5,

    The day must be higher than 5 (i.e. Saturday or Sunday).

    A1 < TODAY())

    The date must be earlier than today.
    Last edited by AliGW; 10-18-2018 at 11:26 AM.

  6. #6
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Re: Conditional Formatting: Weekend Dates

    Thanks Ali. Unfortunately it seems that I am unable to add attachments when replying!!

  7. #7
    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,780

    Re: Conditional Formatting: Weekend Dates

    Yes, you are,

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  8. #8
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Re: Conditional Formatting: Weekend Dates

    Thanks for your help.
    Attached Files Attached Files

  9. #9
    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,780

    Re: Conditional Formatting: Weekend Dates

    Since you are using a full column reference in the applies to box, change the formula to this:

    =AND(WEEKDAY(C1,2) > 5,C1 < TODAY())

  10. #10
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Re: Conditional Formatting: Weekend Dates

    Really appreciate your help, however I still can't get it to work!!! Thanks.

  11. #11
    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,780

    Re: Conditional Formatting: Weekend Dates

    It seems to be working for me.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-17-2018
    Location
    Wales
    MS-Off Ver
    365
    Posts
    11

    Re: Conditional Formatting: Weekend Dates

    That's brilliant, very much appreciated.

  13. #13
    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,780

    Re: Conditional Formatting: Weekend Dates

    You’re welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. 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. Conditional formatting weekend days
    By Jeffa! in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2017, 05:58 AM
  2. [SOLVED] Conditional formatting to highlight due-dates needs to skip weekend
    By jedidavidalan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2017, 12:12 PM
  3. [SOLVED] Conditional Formatting for Columns with Weekend Day
    By deldalton in forum Excel General
    Replies: 17
    Last Post: 02-27-2014, 12:38 PM
  4. conditional formatting on weekend dates only
    By umbata in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-29-2011, 11:23 AM
  5. Replies: 5
    Last Post: 04-09-2010, 07:44 AM
  6. Conditional formatting of weekend dates
    By bluffpoint in forum Excel General
    Replies: 3
    Last Post: 10-21-2006, 08:29 AM
  7. [SOLVED] How do I use conditional formatting to hilite weekend dates where.
    By IngeD in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-18-2006, 10:50 PM

Tags for this Thread

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