IFS function between dates (1 Viewer)

MattioMatt

Registered User.
Local time
Today, 08:34
Joined
Apr 25, 2017
Messages
99
Hello,

I currently have the following IF statement

Code:
=IFS(AF12>=TODAY()-365,"Green",AF12<TODAY()-365,"Red")

This gives me...
1. If cell is less than 12 months old = Green
2. If cell date is more than 12 months old = Red

I would like to amend it to:

1. If cell is less than 12 months old = Green
2. If cell is more than 12 months old but less than 18 months old = Amber
3. If cell is more than 18 months old = Red

I'm struggling on the point 2 where the date could be in between ranges. Is there anyway to do this in an if statement?
 

Ranman256

Well-known member
Local time
Today, 04:34
Joined
Apr 9, 2015
Messages
4,337
Can you use conditional formatting? Not a formula.
 

MattioMatt

Registered User.
Local time
Today, 08:34
Joined
Apr 25, 2017
Messages
99
Unfortunately not, as I am using text as well - I had not copied in the full function just the part of it I was focusing on in this post/question.

Below is the full code.

Code:
=IFS(A7="N/A","N/A",A7="Not Approved","Amber",A7="unknown","Red",A7>=TODAY()-365,"Green",A7>=TODAY()-365,"Green",A7<TODAY()-365,"Red")
 

MattioMatt

Registered User.
Local time
Today, 08:34
Joined
Apr 25, 2017
Messages
99
I've managed to get it working using the following...

Code:
=IFS(A1="N/A","N/A",A1="Not Approved","Amber",A1="unknown","Red",A1<=TODAY()-548,"Red",A1<=TODAY()-365,"Amber",TRUE,"Green")

Thank you so much for your help!
 

Users who are viewing this thread

Top Bottom