Aug 24 2023 12:55 AM
Hi all
I want to conditionally format a sheet so that when training is coming due it will colour the cell a particular colour. So, if training should be renewed every 3 years I need the cell to show amber when it's a few months before being out of date. I have read a similar post for short term dates but don't know how to do it for longer dates. I've put a selection below.
DSE (annual) | Security and Data Protection (annual) | Risk management (annual) | Safeguarding (annual) | Manual Handling (3 yrs) |
no records | 25/03/2023 | 25/03/2023 | 24/01/2022 | no records |
Any help will be gratefully received!
Lois
Aug 24 2023 02:06 AM
With that
rule formula is
=(A2<>"")*( EDATE(A2, IF( ISNUMBER( SEARCH("annual", A$1) ), 12, 36 ) + $H$1 ) < TODAY() )
Aug 24 2023 02:25 AM - edited Aug 24 2023 02:43 AM
I would not have come up with that in a long time! Thank you for showing it is possible.
However, how do I adjust the formula so that the cell is:
I don't understand how the individual components work to put them together do it.
Could you help again please?
Aug 24 2023 05:59 AM
You need as many rules as different formats you'd like to apply. In this case 3 rules. Due Date we calculate as
EDATE(A2, IF( ISNUMBER( SEARCH("annual", A$1) ), 12, 36 ) )
when 3 rules for
DD < today (red)
DD >= today+90 (green)
DD >= today
Rules shall be in above order, conditional formatting applies colors for the first rule which returns TRUE.
Finally
Aug 24 2023 06:30 AM
Aug 24 2023 06:47 AM
SolutionI assume dates in your sample are the dates when previous training was taken. In header column you mention within the text is that annual training or not. If not when we assume that's once per 3 years training.
Thus we try to find in header cells if that's annual training or not. If annual when formula
IF( ISNUMBER( SEARCH("annual", A$1) ), 12, 36 )
returns 12 (months), otherwise 36.
Finally
EDATE(A2, 12)
or
EDATE(A2, 36)
returns the date which is 12 or 36 months later than the date in A2. Other words Due Date.
Aug 24 2023 06:48 AM
Aug 24 2023 08:18 AM
Aug 24 2023 06:47 AM
SolutionI assume dates in your sample are the dates when previous training was taken. In header column you mention within the text is that annual training or not. If not when we assume that's once per 3 years training.
Thus we try to find in header cells if that's annual training or not. If annual when formula
IF( ISNUMBER( SEARCH("annual", A$1) ), 12, 36 )
returns 12 (months), otherwise 36.
Finally
EDATE(A2, 12)
or
EDATE(A2, 36)
returns the date which is 12 or 36 months later than the date in A2. Other words Due Date.