+ Reply to Thread
Results 1 to 6 of 6

How to change data in a cell, based on the date

  1. #1
    Registered User
    Join Date
    06-15-2006
    Posts
    3

    How to change data in a cell, based on the date

    Hey. Heres what I want to do:

    I have a worksheet that has dates of when I need to do things, kind of like a calender. Is there a way to change the color of the text when the date approaches? Please help me!

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Rangerbob86,

    You can use conditional formatting. Select a cell where your dates are say
    A1 then click on the Format menu. Select Conditional Formatting. Change the Cell value is option to Formula is: For Condition one try this if your date is less than 5 days from today.

    =(A1-TODAY())<5

    Select Format>Patterns and select your color. Click OK and OK. Copy the format to the other cells in your range.

    HTH

    Steve

  3. #3
    Registered User
    Join Date
    06-15-2006
    Posts
    3
    hey thanks! that worked. Now, is there also a way to get the formatting to go away, once the date has passed?

  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    This should work.

    =AND((A1-TODAY())<5,(A1-TODAY())>=0)

    Cheers,

    Steve

  5. #5
    Registered User
    Join Date
    06-15-2006
    Posts
    3
    great! so that works....but is there a way to copy and paste the conditional formatting to each of my cells that contain dates? because i think in your formula you have to change A1 to whatever cell it is, right? so do I have to do each one manually?

  6. #6
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    You can use the Format Painter. Select the first cell in your range. Click on the Format painter (looks like a paint brush). While holding down the left mouse button, highlight the rest of your range and release. Or you could go to the first cell in your range (assuming it is a column) move the mouse over the lower right hand corner of the first cell until it changes to a black cross and double click. That will copy it down the range.

    Steve

+ 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