+ Reply to Thread
Results 1 to 8 of 8

Change The Colour Of Text In A Row Depending On The Date Entered

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    3

    Change The Colour Of Text In A Row Depending On The Date Entered

    Hey all, first time poster here!

    I'm working on a project for work, which includes entering in expiry dates for certain pieces of information relating to work sites. I'd like to be able to enter in a formula which will change the colour of the text in the whole row depending on what date is entered for the expiry date. Each entry uses four cells across a row, so say I was to enter it onto Row 3, it would take up Columns A-D. The entry in Column D is titled "Expiry Date".

    I would like to know a relatively simple formula/format which would change the colour of text in the row automatically. I'd like the current date and any dates from the past to show up in red, any dates within the next seven days to show up in orange, and any dates that are in the future outside of those 7 days to show up in green. It would be awesome if we could get them to change each time the spreadsheet is opened, updating depending on the current date.

    Can anyone help me with this?

    Regards,
    Doop

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    You can do this with CONDITIONAL FORMATTING.
    It could be tricky with dates so here is an example.
    This will always be up to date as it is evaluated every time the sheet is calculated.
    Hope this helps
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    If you change the formula of the rule for the red dates to this one, it will prevent to color all empty cells.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-20-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    Quote Originally Posted by p24leclerc View Post
    You can do this with CONDITIONAL FORMATTING.
    It could be tricky with dates so here is an example.
    This will always be up to date as it is evaluated every time the sheet is calculated.
    Hope this helps
    Can you please give me a simple explanation as to how you did that? Also is there any way to stop the colours going down the whole sheet?

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    Have you looked at my last post. I'm giving you a new formula to remedy that problem.
    What kind of explanation do you want?

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    To set up a conditional formatting, you first click on the HOME tab of the menu. Then you select the icon Conditional Formatting. On the drop down menu, you click on NEW RULE... A window will appear and you'll chose the last option "Use a formula to determine which cells to format".
    When you have clicked on this menu, the bottom of the window will change so you can enter your formula and select your desired format for this condition.
    Formula are a bit tricky but you can only learn by doing it. So don't be afraid and try anything you want and see how it works.
    When you are done, you click OK. You can click again on the Conditional Formatting icon and now you will select the Manage Rules...
    You'll see the rule you just created and you will see a column named Applies to. You can click there and change the scope of this rule. You can also add new rules from this window.
    Hope it is clear enough for you.

  7. #7
    Registered User
    Join Date
    02-20-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    Quote Originally Posted by p24leclerc View Post
    To set up a conditional formatting, you first click on the HOME tab of the menu. Then you select the icon Conditional Formatting. On the drop down menu, you click on NEW RULE... A window will appear and you'll chose the last option "Use a formula to determine which cells to format".
    When you have clicked on this menu, the bottom of the window will change so you can enter your formula and select your desired format for this condition.
    Formula are a bit tricky but you can only learn by doing it. So don't be afraid and try anything you want and see how it works.
    When you are done, you click OK. You can click again on the Conditional Formatting icon and now you will select the Manage Rules...
    You'll see the rule you just created and you will see a column named Applies to. You can click there and change the scope of this rule. You can also add new rules from this window.
    Hope it is clear enough for you.
    Thank you for showing me that, I appreciate your help thus far. However, there is no option in the drop down menu for "Any time in the past/future", which is the main thing I'm looking for.

    Any help in regards to a formula/formatting solution would be greatly appreciated.

  8. #8
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Change The Colour Of Text In A Row Depending On The Date Entered

    I'm not sure I undestand what you mean here. In the attached file I provided, thre are 3 formatting conditions. One for the dates in the past, one for today and for future dates. Is there something wrong?

+ 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