+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting - dates that equal to one particular date

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    Sweden
    MS-Off Ver
    Excel for Mac 2011 Version 14.0.0
    Posts
    2

    Conditional Formatting - dates that equal to one particular date

    Hi guys,

    In cell A1 i have a "hardcoded" date & time in the following format: 2011-06-10 02:00
    In the rest of the sheet I have various dates like:

    2011-06-11 01:00
    2011-06-10 04:00
    2011-06-09 12:00
    etc.

    I am trying to make some conditional formatting:
    Every cell that has the same date as cell A1 (indifferent of time) is highlighted green.
    Every cell that has a date that is A1 minus 1 day is highlighted red.
    Every cell that has a date that is A1 plus 1 day is highlighted yellow.

    I have been sweating all evening over this - could someone with skills help?
    Thank you!!!
    Last edited by NBVC; 09-20-2011 at 09:49 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 - dates that equal to one particular date

    Select the range of dates to check.

    Go to Home|Conditional Formatting|Manage Rules

    Select New Rule and then use a formula to determine which cells to format.

    Then enter formula

    =INT(B1)=INT($A$1)

    where B1 is top most cell you selected to format

    Click Format and choose Green from the Fill tab.

    Click Ok,

    Click New Rule and repeat with formula:

    =INT(B1)=INT($A$1)-1

    Format as Red

    and repeat with formula

    =INT(B1)=INT($A$1)+1

    format as yellow.
    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
    Registered User
    Join Date
    09-19-2011
    Location
    Sweden
    MS-Off Ver
    Excel for Mac 2011 Version 14.0.0
    Posts
    2

    Re: Conditional Formatting - dates that equal to one particular date

    Thank you very much NBVC! It now works like a charm. The trick for me was to understand that the selection should be represented in the formula by the top most cell I've selected to format - in my case cell B1. No other forum/tutorial was able to visualize this. Huge thanks once again!

+ 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