+ Reply to Thread
Results 1 to 8 of 8

Conditional formatting (I think)

  1. #1
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Exclamation Conditional formatting (I think)

    Hi all.
    I could do with some help please!
    I am trying to put a training file together, and want the date to be colour coded (red,amber,green) dependant on the frequency of training refresher.
    As an example, if two people did a course on 10/10/2018, and the frequency is 12 weeks, then the cell is red, change the drop down box to 12 months, it goes green etc.
    Hopefully that makes sense! The range is 12 weeks, 12 months, 3 years, 5 years, NA.
    I have attached a picture (can't post the file on attachments?) so hopefully it will make more sense, if anyone can help?
    I think it would be conditional formatting using a formula with nested If statements less than/greater than each condition, but I am not sure, and I would probably end up with some ridiculously long formula!
    Thanks in advance for any help!! Capture.JPG

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional formatting (I think)

    Do you mean it turns red because the refresher date has passed and it's green whilst it's in the future still?

    BSB

  3. #3
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Conditional formatting (I think)

    Hi, yes, that's exactly it!
    Thanks

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional formatting (I think)

    Have a look at the attached. I've used a small lookup table on Sheet2 to calculate the number of days. This saves the nested IF approach which would be a lengthy formula indeed.

    Two conditional formatting rules. Both using a formula to determine the outcome:

    Red - =AND(C8<>"",TODAY()>C8+VLOOKUP(C$5,DaysLookup,2,0))
    Green - =AND(C8<>"",TODAY()<=C8+VLOOKUP(C$5,DaysLookup,2,0))

    Personally I'd add in another one to show the refresher is due within X number of days as amber.

    Hope that helps.

    BSB
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Conditional formatting (I think)

    That's it exactly!! Thanks very much for the help.
    What would an amber formula look like for within 30 days please?

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional formatting (I think)

    Amber would be:
    =AND(C8<>"",TODAY()>C8+VLOOKUP(C$5,DaysLookup,2,0)-30)
    You need to make sure the three rules are in the correct order though. Red/Amber/Green.
    See attached.

    BSB
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Conditional formatting (I think)

    Thanks once again for your help.!

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional formatting (I think)

    No problem. Happy to help.

    Don't forget to mark the thread as SOLVED if you're happy you have a working solution.

    BSB

+ 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. [SOLVED] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  2. Replies: 1
    Last Post: 12-08-2016, 03:14 PM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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