+ Reply to Thread
Results 1 to 5 of 5

Help with Condtional Formating to not highlight Saturdays & Sundays

  1. #1
    Registered User
    Join Date
    09-26-2015
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Help with Condtional Formating to not highlight Saturdays & Sundays

    I am looking to see if there is a way to exclude weekends from a employee attendance register, it all works perfect, except in the visual calendar.

    It use conditional formatting to color on a calendar what type of leave it is, no one works weekends.

    If you input single days all fine, but when say enter 2 weeks it colors the weekends as well. Is there a way this can not occur.

    This is the formula for for the conditional formatting.

    =(MONTH(H9)=MONTH($C9))*(COUNTIFS(lstEmpNames,valSelEmployee,lstSdates,"<="&H9,lstEDates,">="&H9,lstHTypes,Settings!$C$2)>0)

    Capture.PNG

    It colors it different depending on type of leave this all works fine, just wondering if there is a way so the Saturday & Sunday don't get colored.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Help with Condtional Formating to not highlight Saturdays & Sundays

    1 of 2 ways, depending on if you have actual dates in row 8 or day letters.. If letters, then something like...
    =h$8<>"s"

    or
    Take a look at the WEEDAY function.
    =
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-26-2015
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Help with Condtional Formating to not highlight Saturdays & Sundays

    Thanks for your reply, I have tried various ways to incorporate your 1st suggestion into the existing formula but unable to get it to work.

    In row 8 is only letters.
    Please Login or Register  to view this content.
    I am not sure exactly where it should appear either.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: Help with Condtional Formating to not highlight Saturdays & Sundays

    You might get other people to respond if you attach a sample Excel workbook, rather than a picture of one.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-26-2015
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Help with Condtional Formating to not highlight Saturdays & Sundays

    Thanks for your reply
    Attached Files Attached Files

+ 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. IF Statements, Weekdays, Saturdays & Sundays
    By mh348 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 01-30-2020, 01:20 PM
  2. [SOLVED] CF Saturdays Sundays and Holidays
    By Excelski in forum Excel General
    Replies: 6
    Last Post: 11-10-2017, 06:10 PM
  3. [SOLVED] Workdays / Saturdays / Sundays in a Month
    By JcOrlando in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2014, 12:59 AM
  4. Days of the week (to exclude Saturdays/Sundays)
    By btk125 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2012, 10:08 AM
  5. Include Saturdays and maybe Sundays?
    By lil_ern63 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-12-2008, 11:38 AM
  6. counting days excluding saturdays and sundays
    By p_dhoke in forum Excel General
    Replies: 2
    Last Post: 04-24-2007, 04:34 AM
  7. [SOLVED] Calculate the number of Saturdays or Sundays between 2 dates?
    By Jim Long in forum Excel General
    Replies: 1
    Last Post: 11-01-2005, 04:09 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