+ Reply to Thread
Results 1 to 4 of 4

Adding a "between" formula in conditional formatting

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Southeast
    MS-Off Ver
    Excel 2007
    Posts
    7

    Adding a "between" formula in conditional formatting

    Hey I've tried looking around here to solve this problem, but didn't find a solution. Basically I'm creating an excel spreadsheet covering names and dates of people who have taken online training courses that have to be retaken every year. I want the spreadsheet to change the colors of the cells based on how close the person's training qualification is about to expire. So far this is all I've come up with in conditional formatting...

    If someone conducted training more than 11 1/2 months ago then the cell will turn red
    =ROUND(NOW()-F1,0)>350

    If someone If someone conducted training less than 11 months ago then the cell will turn green
    =ROUND(NOW()-F1,0)<335

    For some reason I can't get excel to accept a formula that will change the cell color to yellow if the person is in between 335 and 350 days.

    Thanks

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Adding a "between" formula in conditional formatting

    Instead of NOW(), you can use TODAY(), then it just uses the date, instead of date & time, but for the yellow highlight that you want, try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Moo

  3. #3
    Registered User
    Join Date
    11-15-2012
    Location
    Southeast
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Adding a "between" formula in conditional formatting

    Okay the final result was by going into "Conditional Formatting" > "Edit Rule" > "Use a formula to determine..." and adding these formulas into the text box and formatting the fill to the appropriate color.

    For the red cells,
    Please Login or Register  to view this content.
    Yellow,
    Please Login or Register  to view this content.
    And green cells.
    Please Login or Register  to view this content.
    Thanks to Moo the Dog for the fast response.

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Adding a "between" formula in conditional formatting

    You're welcome, Reizor. One thing I'll mention though is that you changed the yellow highlight code from '>=335 or <=350' to '>335 or <350'. The problem with that is that when F1 is exactly 335 or 350 days prior to today's date, conditional formatting won't apply, since they aren't in any of the ranges in your requirements.

    - Moo

    - - - - - - - - - -
    If you are satisfied with the solution(s) provided, please mark the thread as [SOLVED] by clicking on the words 'Thread Tools' above your 1st post in this thread. Then select 'Mark Thread as Solved'.

    Also, a good way to 'Say thanks' to those who have helped is to click on the star below their name in one of their posts. It's always appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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