+ Reply to Thread
Results 1 to 9 of 9

Changing the colour of a cell in direct relation to the date within Excel 2007

  1. #1
    Registered User
    Join Date
    03-27-2014
    Location
    York England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Changing the colour of a cell in direct relation to the date within Excel 2007

    Hi Guy's
    I have a spreadsheet in which I am trying to alert the user to approaching audit dates.

    I am trying to make it "Green" if within 11Mths, Amber if within 28 Days and Red over 28 days or actual date within the cell.

    The Spreadsheet is a shared "Living" document and as such has lines added or deleted within various places not just added to the bottom. There are quite a few tabs in the original workbook, in the same layout displaying the same information for different Partners, each Worksheet is also split and not one continuous table I am so inexperienced with Excel I am unsure as to whether this could be a problem? I have tried using the conditional formatting tool to no avail.

    I have attached a copy of a Tab. It is column "K" that I am trying to Colour/Date Formularise.

    Any help would be greatly appreciated.

    Very Many Thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    check it out
    Example 1.xlsx

    I did it in 2010, I am not sure about 2007.
    Click on the star if you think I helped you

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    I'm not sure on what your criteria are (which side of posted date are we calculating from)
    Here are some examples though
    Selecting Column K
    Conditional Formatting>New Rule>Use Formula
    =AND(ISNUMBER(K1),K1-TODAY()<28) If date is within 28 days of today

    =AND(ISNUMBER(K1), K1-TODAY()<(30*11)) If date is within 11 months (approx.) of today

    =AND(ISNUMBER(K1), K1-TODAY()>(30*11)) If date is greater than 11 months from today
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    03-27-2014
    Location
    York England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    adyteo,
    Many thanks for the reply, I will try and work through your suggestions.

  5. #5
    Registered User
    Join Date
    03-27-2014
    Location
    York England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    ChemistB,
    Many thanks for the reply, I should have said that it is all heading toward the date:

    I am trying to make it "Green" if within the 11Mths toward the date in the cell, Amber if within 28 Days of reaching the date in the cell and Red if the same or passed the date in the cell.

    Apologies for the confusion.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    =AND(ISNUMBER(K1),K1<=TODAY()) RED

    =AND(ISNUMBER(K1), K1-TODAY()<28) Amber

    =AND(ISNUMBER(K1), K1-TODAY()<=(30*11)) Green

  7. #7
    Registered User
    Join Date
    03-27-2014
    Location
    York England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    ChemistB,
    I very much appreciate your help and I hope you can remain patient with me a little longer. I am trying your last formula and am wondering whether the sheet needs to be formatted to some sort of "date" setting so excel can "read and calculate" date numbers?
    Many thanks.
    PTSO

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    No, as long as they are not seen as text. You can check that. If you want to check B3 for example, in a blank cell
    =ISNUMBER(B3) if you get false, it's text.

    The order of the 3 rules is important however. Red should be first with Stop if true checked
    then amber then green.

  9. #9
    Registered User
    Join Date
    03-27-2014
    Location
    York England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Changing the colour of a cell in direct relation to the date within Excel 2007

    ChemistB,
    Many thanks for the help.
    Kind regards
    PTSO

+ 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. Changing cell font colour with VBA....excel 2007 to 2010 compatability issue?
    By qaliq in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 07:08 AM
  2. Replies: 3
    Last Post: 07-14-2012, 02:36 PM
  3. VBA Excel 2007 changing network printer colour settings
    By rosshkerr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2012, 11:48 PM
  4. Help changing colour of cell depending on date entered
    By dazlia in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-07-2011, 10:59 AM
  5. a cell changing colour base on date comparion
    By mambo84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2010, 02:59 AM

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