+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting based on day of month

  1. #1
    Registered User
    Join Date
    05-09-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    41

    Conditional formatting based on day of month

    If I have the days of the month listed in row 3 (ie 1-31 for the month of July), what code could I use to have the cell that contains the number that corresponds to the present day of the month change color. For example: if it’s 21 July 2010, I would want the cell that has the number 21 in it to turn red. Any help would be greatly appreciated.

    I know how to have conditional formatting change the cell if the entire date is in the cell, but I don’t want the cells to contain the entire date. They’d be too wide. I want it to look more like a calendar.
    Last edited by SinGin; 07-21-2010 at 12:37 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting based on day of month

    If the entire date is in the cell, but it is just formatted to show day with d or dd custom format, then you can still use the date.

    i.e. Cell Value is >> equal to >> =Today()
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional formatting based on day of month

    If you just have numbers in the cells you can use

    =A3=DAY(TODAY())
    Audere est facere

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting based on day of month

    Quote Originally Posted by daddylonglegs View Post
    If you just have numbers in the cells you can use

    =A3=DAY(TODAY())

    Only thing is is that if the OP has a whole calendar (more than just July), then that would highlight all the 21st dates of the calendar...

  5. #5
    Registered User
    Join Date
    05-09-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Conditional formatting based on day of month

    Thanks all; works great!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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