RAG Status Formula

Bidds10

New Member
Joined
Jan 17, 2022
Messages
18
Office Version
  1. 365
Hi All,

This formula is driving me insane. Could anyone help me with the below please? I'm trying to insert a new RAG/SLA status so I don't have to manually change.

RAG =
Before today = "Red"
Is today = "Amber"
Tomorrow = "Yellow"
In future = "White"

The dates are determined by 3x date columns. Attend Target, Attend Actual and Fix Target.
If 'Fix Target' is before today then "Red", If blank then check if there is a date in 'Attend Target' or 'Attend Actual' If all blank then "White". Else use the closest date.

I hope this makes sense, I've added a picture example of the statuses and dates, Any help would be greatly appreciated.

TIA.


P.S I managed to get this far, but the only status which seems to be correct is "Red" -

=IF(OR(AU5017<TODAY(), AS5017<TODAY()), "Red", IF(OR(ISBLANK(AU5017), ISBLANK(AS5017)), IF(AU5017<TODAY(), "Red", IF(AS5017<TODAY(), "Red")), IF(OR(AU5017=TODAY(), AS5017=TODAY()), "Amber", IF(OR(AU5017=TODAY()+1, AS5017=TODAY()+1), "Yellow", "White"))))
 

Attachments

  • RAG.png
    RAG.png
    33.7 KB · Views: 15
So the closest date part only applies to the actual and target attend columns?
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi ya, Thank you for the reply! But no sorry. This is still coming out wrong. :( Please see below.

Your column in the one on the right. The correct one is the one on the left.

View attachment 103324
Then I don't understand your rules. Because I entered the results both manually and with a formula, and the formula matched what I thought I understood your rules to mean. I will take another look and see if I can adjust the formula. I think the biggest misunderstanding is that you said you in your original post to look at Fix Target Date first, so that is what I was doing and ignoring the other two dates if Fix Target Date was not blank.

Is Fix Target Date only useful if it is before today? And if it is not before today, then look at the other two dates?
 
Upvote 0
Why is row 95 Amber and not Red?

All dates (excluding FIX TARGET DATE) are before today. Even if I change Fix to a later day considering today is now the 11th, it shows red.

Attend TargetAttend ActualFix Target
20/10/20239/10/202311/12/2023
 
Upvote 0
Why is row 95 Amber and not Red?

All dates (excluding FIX TARGET DATE) are before today. Even if I change Fix to a later day considering today is now the 11th, it shows red.

Attend TargetAttend ActualFix Target
20/10/20239/10/202311/12/2023

Hi ya, row 95 is amber because there is an attend target date, there is an attend actual date and the fix target date was today (yesterday) so sla status is amber.
 
Upvote 0
Hi ya, row 95 is amber because there is an attend target date, there is an attend actual date and the fix target date was today (yesterday) so sla status is amber.
Okay, I need some serious clarification of your conditions then. This is how I was understanding them based on your original post:

"If 'Fix Target' is before today then "Red", If blank then check if there is a date in 'Attend Target' or 'Attend Actual' If all blank then "White". Else use the closest date."

First, I thought I was looking at FIX TARGET DATE first before anything else, and ignoring all other dates if FIX TARGET DATE was not blank. - That was incorrect.
Then, I thought I was only looking at FIX TARGET DATE if it was before today, then using ATTEND TARGET/ACTUAL DATE (whichever was closest to today). - That was incorrect.

Please explain in full detail the priority of the dates. I'm confusing myself more as I try to wrap my head around what I thought your conditions meant and your follow-up posts.
 
Upvote 0

Forum statistics

Threads
1,223,875
Messages
6,175,117
Members
452,613
Latest member
amorehouse

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