+ Reply to Thread
Results 1 to 4 of 4

Auto-format Dates and weekends

  1. #1
    Registered User
    Join Date
    10-24-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    1

    Auto-format Dates and weekends

    Hello everyone. I admit it....Excel has beaten me. I need a little help if you can.

    I need to set up a checklist for my users that will allow someone to also go behind and double check their work. So, I need two rows for each day of the month. But, I would like to gray out the weekend days since no-one is usually at work on those days. I can do the conditional formatting to get the weekends highlighted if I set the dates up in advance, but I want to have the spreadsheet change with me simply changing the month and year once on the top of the page and then the dates follow suit by calculating the weekends. For example: I would like to change the Sep 16 cell below to Oct 16 and then rows two through four (1st and 2nd of Oct) would automatically grey out. Of course columns B through whatever will be used also and should be highlighted with the weekend dates. Is this possible?

    Sep-16
    1
    1
    2
    2
    3
    3


    Thanks for any help or guidance you can offer here.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Auto-format Dates and weekends

    In the attached I've used the below formula to deal with the conditional formatting:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This checks the dates in column A and if it's a Sat (1) or Sun (7) then it will shade the row.

    I've also used a slightly complicated formula from A4 downward that will leave the last few cells in column A blank if the month doesn't have 31 days.

    Hopefully somewhere near what you're after.

    BSB
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,936

    Re: Auto-format Dates and weekends

    Or ...

    =WEEKDAY($A3,2)>5

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

    Re: Auto-format Dates and weekends

    With this in Worksheet_Change

    Please Login or Register  to view this content.
    and this for conditional formatting

    Please Login or Register  to view this content.
    Kind regards
    Leo

+ 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. Replies: 13
    Last Post: 11-16-2019, 12:14 AM
  2. [SOLVED] format columns based on dates i.e. weekends
    By Rob K in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2014, 04:31 AM
  3. Auto name tabs with dates excluding weekends and holidays
    By Eeyora in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-25-2013, 06:54 PM
  4. Auto name tabs with dates excluding weekends and holidays
    By Eeyora in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2013, 02:50 PM
  5. Replies: 1
    Last Post: 11-01-2012, 03:41 PM
  6. Excel 2007 : Display Dates without weekends
    By rajeloke2 in forum Excel General
    Replies: 6
    Last Post: 04-26-2011, 10:05 AM
  7. Dates (minus weekends)
    By melvin in forum Excel General
    Replies: 2
    Last Post: 01-19-2005, 07:58 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