Traffic Light System for Dates

CarmsT

New Member
Joined
Sep 13, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hiya everyone!!

Bit of a young buck who for the life of me cannot get this traffic light system to work on an excel spreadsheet! I have tried every forum method and it just wont work!
Basically I am data managing patient data and for example I am checking the dates everyone last had their bloods taken. If its within the year 2022 it would be Green. If it was last year Red. And if i have invited them in to have a blood test on for example today - yellow so im aware whos been invited.

Please help! I cant wrap my head around it at all!
 

Attachments

  • Screenshot 2022-09-13 123331.png
    Screenshot 2022-09-13 123331.png
    9.4 KB · Views: 19

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If its within the year 2022 it would be Green. If it was last year Red.
Just a quick check on exact requirement here, should it be calendar year or last 12 months (the way that you have asked your question implies that a blood test carried out in mid December would be valid for less than 1 month, yet one carried out in early January would be valid for almost 12 months :unsure:
 
Upvote 0
Just a quick check on exact requirement here, should it be calendar year or last 12 months (the way that you have asked your question implies that a blood test carried out in mid December would be valid for less than 1 month, yet one carried out in early January would be valid for almost 12 months :unsure:
Also where ive confused myself with the coding of it all sorry! Last 12 months 🤦‍♀️Sorry!
 
Upvote 0
Also where ive confused myself with the coding of it all
We've all been there and done that. I would doubt the honesty of anyone who says that they haven't.

I've done a quick example for you with some random dates, is this anything close to what you need?

Book1
ABC
1Last testInvite
203/07/2021
320/02/2022
409/12/2021
511/06/2021
626/09/2021
720/10/2021
810/12/2021
908/03/2022
1012/01/2022
1126/08/2022
1224/11/2021
1324/08/2021
1410/09/202113/09/2022
1504/07/2021
1623/05/202113/09/2022
1728/05/2022
1828/09/2021
1902/06/2022
2005/03/2022
2123/06/2021
2205/08/2022
2319/07/2022
2419/04/2022
Sheet6
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A24Expression=C2=TODAY()textYES
A2:A24Expression=A2<TODAY()-365textYES
A2:A24Expression=A2<TODAY()textNO
 
Upvote 0
How do I do that in a Dummies guide?
I'm never very good at doing these but I'll give it a go,

First, you need to select the range of dates that you want to highlight starting from the top left corner, so from A2 down to A24 in my example sheet.
Next go to the conditional formatting manager, on the Excel ribbon that is Home > Conditional Formatting >Manage rules.

Note that anywhere I've used A2 in the formulas, you will need to use the top left cell of the date range that you have selected (if different).
Where I have used C2 in a formula, you will need to use the cell that contains the Invite Date relative to A2 (doesn't matter if the cell is blank at the moment).

The Next step is to go to New Rule > Use a formula to determine which cells to format.
In the box labelled Format values where this formula is true: enter the bottom formula from the example that I provided earlier (Green highlight).
Click on the Format button below the box that you entered the formula into, then go to the Font tab and click the Color dropdown. Choose your desired shade of green, then click OK twice.

Repeat the steps in the 3 lines above for the Yellow highlight, then the Red highlight using the other 2 formulas from my earlier post.

Make sure that the Stop if True boxes are ticked for the Red and Yellow rules (green doesn't need it). Then click Apply.

You should now see the formatting applied to the sheet behind the pop up box. If all is good then click OK and you're done.

Hopefully I haven't missed any steps but if it looks wrong, please take a screen capture showing as much of the screen as possible without compromising any private / confidential details. Ideally, I need to see the box where you have just set up the 3 formatting rules and the dates in the sheet behind. If you need to trim the top or left side off of the screen capture then I will need to know exactly which rows an columns are visible in the image.
 
Upvote 0
It didnt work! I have tried a few times and it just doesnt seem to like it
 
Upvote 0
What is it doing, or not doing? Are you getting any kind of error message?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top