+ Reply to Thread
Results 1 to 5 of 5

Highlight cells on 20 days from birthday

Hybrid View

Lynn McCurdy Highlight cells on 20 days... 05-11-2011, 02:45 PM
buran Re: Highlight cells on 20... 05-11-2011, 03:16 PM
NBVC Re: Highlight cells on 20... 05-11-2011, 03:27 PM
alansidman Re: Highlight cells on 20... 05-11-2011, 03:20 PM
buran Re: Highlight cells on 20... 05-11-2011, 04:29 PM
  1. #1
    Registered User
    Join Date
    05-10-2011
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    27

    Highlight cells on 20 days from birthday

    I have an excel spreadsheet with about 50 names. One of the columns on the spreadsheet is labeled, "Birthday." I am trying to figure out how I can program this spreadsheet to cause the cell to change it's background color so that when I glance at the spreadsheet I can tell whose birthday is 20 days out from the day that I am looking at the spreadsheet. In other words, today is May 11th. I would like to open up the spreadsheet today and have any birthday 20 days or less out from today have the cell highlighted so that I can easily pick out whose birthday is coming up. Then after the birthday date is over, have the cell go back to it's normal color.
    Attached Files Attached Files
    Last edited by Lynn McCurdy; 05-12-2011 at 01:40 PM.

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Highlight cells on 20 days from birthday

    Hi,
    There is no need of programming. You can use conditional formatting. See attached file example.

    Buran
    Attached Files Attached Files
    If you are pleased with a member's answer then use the Star icon to rate it.

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

    Re: Highlight cells on 20 days from birthday

    That formula won't work if today is say, December 25, 2011. It will not highlight the Jan 1, 1990 birthday....

    Try conditional formatting formula:

    =IF((DATE(YEAR(TODAY()),MONTH(A2),DAY(A2)))<TODAY(),DATE(YEAR(TODAY())+1,MONTH(A2),DAY(A2)),(DATE(YEAR(TODAY()),MONTH(A2),DAY(A2))))<TODAY()+20
    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.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,702

    Re: Highlight cells on 20 days from birthday

    Look at the attached.

    Alan
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Highlight cells on 20 days from birthday

    @NBVC - you are right, my mistake. thanks for this correction :-)

+ 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