Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: changing color of a cell based on logical return

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I need to change the text color in a given cell if it contains yesterday's date. The date is entered in the following format (if it matters):
    4/15/02 (for example)
    After the next day, all the previous cells that were yesterday's date will be two days ago and I need them to go back to normal black...and the new dates that qualify as yesterday should highlight text. What can I do?

    thanks for all responses.

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Highlight your range and se conditional formatting under the format menu.

    set condition one to cell value is equal to and then type in =today()-1. Then select whatever format you want to apply to yesterday's date.


  3. #3
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,024
    Post Thanks / Like
    Mentioned
    37 Post(s)
    Tagged
    7 Thread(s)

    Default

    On 2002-05-02 13:45, thexfactor44 wrote:
    I need to change the text color in a given cell if it contains yesterday's date. The date is entered in the following format (if it matters):
    4/15/02 (for example)
    After the next day, all the previous cells that were yesterday's date will be two days ago and I need them to go back to normal black...and the new dates that qualify as yesterday should highlight text. What can I do?

    thanks for all responses.
    Select relevant range of dates and apply conditional formatting with Formula is where you enter:

    =TODAY()-E1=1

    and select a format.

    E1 is the first cell of the range. Adjust to suit.

  4. #4
    Board Regular s-o-s's Avatar
    Join Date
    Apr 2002
    Location
    Kissimmee, Florida
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-02 13:45, thexfactor44 wrote:
    I need to change the text color in a given cell if it contains yesterday's date. The date is entered in the following format (if it matters):
    4/15/02 (for example)
    After the next day, all the previous cells that were yesterday's date will be two days ago and I need them to go back to normal black...and the new dates that qualify as yesterday should highlight text. What can I do?

    thanks for all responses.
    Lets assume column A holds the dates in your spreadsheet and Cell A1 holds todays date.

    Lets say the Text is in Column B and you want to put on a Red fort to yesterdays Text.

    select the whole Column B

    Call up Format - Conditional Formating

    Change 1st box in Condtion 1 to Formula is

    In 2nd box enter the formula

    =A1=$A$1-1

    Click format button change font to bold and red

    click OK

    That should do the trick


    Hope This Helps




    Hope This Helps.
    Sean.
    Digest of Homes

    WinXP, XL XP

  5. #5
    New Member
    Join Date
    Feb 2002
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    THANKS! you helped again...quite a good think tank gathering over here..I appreciate it!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •