+ Reply to Thread
Results 1 to 5 of 5

Formatting a range of cells based on a date

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Formatting a range of cells based on a date

    Hi, I have a date in a cell that when it is less than today() (so yesterday's date) would turn red and the 5 cells to its immediate right would also turn red, if the date is still current then it would be green and so would the right hand cells.

    How do I do this as its driving me nuts.

    Cheers in advance

    JD

  2. #2
    Registered User
    Join Date
    09-06-2013
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Formatting a range of cells based on a date

    What is your question? How to format your dated cells to be colored with your parameters?

  3. #3
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Re: Formatting a range of cells based on a date

    Yes please I am using excel 2010 the date is in A1 and I need A1 to A6 to be coloured depending on the date entered into A1
    Last edited by john dalton; 09-06-2013 at 10:39 AM. Reason: additional information

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Formatting a range of cells based on a date

    You would use Conditional Formatting, using a formula. Assume your date is in column A and so the effect needs to apply to columns A-F. Assume also that you have a header row, so your data begins on row 2 (it's always useful to state which cells you are using). Select the data from A2 to F-whatever, then click on Conditional Formatting | New Rule and choose the option Use a Formula... from the bottom of the list. Enter this formula in the dialogue box:

    =AND($A2<TODAY(),$A2<>"")

    then click the Format button then the Fill tab and choose Red. OK your way out, and Excel will apply that format by adjusting the cell references within the selected range. You can do the same for green, but you would use this formula:

    =$A2>=TODAY()

    Hope this helps.

    Pete

  5. #5
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Re: Formatting a range of cells based on a date

    Cheers Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  2. Replies: 5
    Last Post: 08-06-2013, 02:13 PM
  3. Formatting cells based on another cell date range
    By howie8790 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2012, 01:53 PM
  4. Replies: 8
    Last Post: 11-15-2011, 12:29 PM
  5. [SOLVED] Conditional formatting based on date range
    By RGB in forum Excel General
    Replies: 3
    Last Post: 05-23-2006, 12:45 PM

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