Working out RAG status based on 3 columns

theguyIsHere

New Member
Joined
Oct 2, 2013
Messages
19
Office Version
  1. 2019
Platform
  1. MacOS
Trying to summarise the RAG status in one field but unsure how I do that

Column D needs to make sure it groups Column A and then column B and then assign the lowest RAG from column C

For example, For Workstream 1, 'Pilot' appears twice in column B with the lowest RAG status of Red. So Column D automatically needs to assign Red to Workstream 1, pilot sub workstream.

If it is easier then RAG status could be assigned a number too. For example: Red = 1, Amber = 2, Green = 3, Complete = 4 etc

Table with dummy data below. Grateful for any assistance on this, please.

Column AColumn BColumn CColumn D
WorkstreamSub-WorkstreamRAGCalculated RAG - Sub workstream
Workstream 1PilotGreenRed
Workstream 1PilotRedRed
Workstream 1DevCompleteComplete
Workstream 2TestGreenAmber
Workstream 2TestAmberAmber
Workstream 2TestGreenAmber
Workstream 2ReqRedRed
Workstream 2DarkGreenGreen
Workstream 2DarkGreenGreen
Workstream 3YellowAmberRed
Workstream 3YellowRedRed
Workstream 3BlueCompleteAmber
Workstream 3BlueAmberAmber
Workstream 3BlueGreenAmber
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
WorkstreamSub-WorkstreamRAGOrderCalculated RAGGroupedColourValue
Workstream 1PilotGreen
3​
RedWorkstream 1 Pilot RedRed
1​
Workstream 1PilotRed
1​
RedWorkstream 1 Pilot RedAmber
2​
Workstream 1DevComplete
4​
CompleteWorkstream 1 Dev CompleteGreen
3​
Workstream 2TestGreen
3​
AmberWorkstream 2 Test AmberComplete
4​
Workstream 2TestAmber
2​
AmberWorkstream 2 Test Amber
Workstream 2TestGreen
3​
AmberWorkstream 2 Test Amber
Workstream 2ReqRed
1​
RedWorkstream 2 Req Red
Workstream 2DarkGreen
3​
GreenWorkstream 2 Dark Green
Workstream 2DarkGreen
3​
GreenWorkstream 2 Dark Green
Workstream 3YellowAmber
2​
RedWorkstream 3 Yellow Red
Workstream 3YellowRed
1​
RedWorkstream 3 Yellow Red
Workstream 3BlueComplete
4​
AmberWorkstream 3 Blue Amber
Workstream 3BlueAmber
2​
AmberWorkstream 3 Blue Amber
Workstream 3BlueGreen
3​
AmberWorkstream 3 Blue Amber



In my version I think you may need Office 365 - and also the helper grid for the colors and order values.


Assume start column is "Workstream" which is column A & "Value" is column I is the last column for reference.

D2 =XLOOKUP(C2, H:H, I:I)
E2 = XLOOKUP(MINIFS($D$2:$D$15,$B$2:$B$15,B2),I:I,H:H)
F2 = A2&" "&B2&" "&E2
Copy down the above to the end of your data sets. You can rearrange F2 as you see fit to assign description.
 
Upvote 0
A layer of complexity, if you had a 3rd column which had to be used to calculate the RAG status. Can that be added to the formula?

Here is my formula which I cannot get to work : -s

=IF(D2="Red","Red",VLOOKUP(MIN($A$2:$A$18=A2,IF($B$2:$B$18=B2,$E$2:$E$18,IF($C$2:$C$18=B2,$E$2:$E$18))),{1,"Red";2,"Amber";3,"Green"},2,FALSE))
 
Upvote 0
WorkstreamSub-WorkstreamRAGOrderCalculated RAGGroupedColourValue
Workstream 1PilotGreen
3​
RedWorkstream 1 Pilot RedRed
1​
Workstream 1PilotRed
1​
RedWorkstream 1 Pilot RedAmber
2​
Workstream 1DevComplete
4​
CompleteWorkstream 1 Dev CompleteGreen
3​
Workstream 2TestGreen
3​
AmberWorkstream 2 Test AmberComplete
4​
Workstream 2TestAmber
2​
AmberWorkstream 2 Test Amber
Workstream 2TestGreen
3​
AmberWorkstream 2 Test Amber
Workstream 2ReqRed
1​
RedWorkstream 2 Req Red
Workstream 2DarkGreen
3​
GreenWorkstream 2 Dark Green
Workstream 2DarkGreen
3​
GreenWorkstream 2 Dark Green
Workstream 3YellowAmber
2​
RedWorkstream 3 Yellow Red
Workstream 3YellowRed
1​
RedWorkstream 3 Yellow Red
Workstream 3BlueComplete
4​
AmberWorkstream 3 Blue Amber
Workstream 3BlueAmber
2​
AmberWorkstream 3 Blue Amber
Workstream 3BlueGreen
3​
AmberWorkstream 3 Blue Amber



In my version I think you may need Office 365 - and also the helper grid for the colors and order values.


Assume start column is "Workstream" which is column A & "Value" is column I is the last column for reference.

D2 =XLOOKUP(C2, H:H, I:I)
E2 = XLOOKUP(MINIFS($D$2:$D$15,$B$2:$B$15,B2),I:I,H:H)
F2 = A2&" "&B2&" "&E2
Copy down the above to the end of your data sets. You can rearrange F2 as you see fit to assign description.

Since I can see you're on Excel 2019:

The below should work:

D2 = INDEX(I:I, MATCH(C2, H:H, 0))
E2 = INDEX(H:H, MATCH((MINIFS($D$2:$D$15,$B$2:$B$15,B2)), I:I, 0))
F2 = A2&" "&B2&" "&E2
 
Upvote 0
Adding more workstreams to the formula above but it does not work. Why is this not working, pls?

Excel Formula:
=IF(E2="Red","Red",VLOOKUP(MIN($A$2:$A$18=A2,IF($B$2:$B$18=B2,IF($C$2:$C$18=C2,$F$2:$F$18))),{1,"Red";2,"Amber";3,"Green"},2,FALSE))
 

Attachments

  • Screenshot 2022-02-16 at 09.22.38.png
    Screenshot 2022-02-16 at 09.22.38.png
    132.7 KB · Views: 4
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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