Excel formula

BillWright

Well-known member
UKGSer Subscriber
Joined
Jul 30, 2005
Messages
1,392
Reaction score
33
Location
Bucks
Hi. I’m trying to create an Excel spreadsheet for vehicle safety inspections and other due dates. Is there a basic formula for the relative cell to change colour from green to amber to red as the due date approaches?

I’ve concluded that my ballet dancing skills are on a par with my knowledge of spreadsheets.
thanks
 
Yes it is possible by using Conditional Formatting to create Rules that determine the format of cells based on their values. You can have cell colours tied to cell values. Hope that makes sense – if not, look up Conditional Formatting.
 
There are many You-Tube videos that can provide guidance on Excel (and other applications). Check them out; you'll learn some new tricks! :cool:
 
I have something that uses the IF function and "Today()" to give a "check" or "-" which does what you're asking in a colour blind way.

That is, (where A71 is the date of expiry etc) =IF((TODAY()-A71)<3,"check","-")
 
Something like this?

If your MOT is upto 330 days old the cell will be "OK"
If your MOT is more than 330 days old cell will read "Due"
If your MOT is 365 days old it will read "EXPIRED!

You can then run conditional formatting on that cell using a formula

=B2="EXPIRED!"
set that condition to red

and another on same cell
=B2="Due"
Set that condition to orange or yellow

A​
B​
1
MOT Date
Days Since MOT
2
12/11/2023​
=IF(A1="","",IF(TODAY()-A1<330,"OK",IF(TODAY()-A1>365,"EXPIRED!","Due"))))​
 
Last edited:
  • Like
Reactions: SBD
Apologies that formula should read

=IF(A2="","",IF(TODAY()-A2<330,"OK",IF(TODAY()-A2>365,"EXPIRED!","Due"))))

I used cell reference A1 it should be A2 obviously
 
Many thanks for all the help.
looking at the formula, I can see why it’s above my limited capabilities.
 


Back
Top Bottom