Hi,
I am putting together a RAG rating system to denote a cost x number of services as Red, Amber or Green.
There are 4 possible cost brackets x 3 possible numbers of services meaning that potentially there could be 12 different results (however, I have limited the results to 3 - RED AMBER GREEN.
Please see attached example. I am looking for a formula which will look at the value in column C and number of services in column D and calculate the result in E.
Thanks and regards
MG
Last edited by Gooford; 06-20-2011 at 08:59 AM.
Try perhaps:
=LOOKUP(INDEX($D$6:$F$9,MATCH(TRUE,INDEX($C$6:$C$9<=C15,0),0),MATCH(D15,$D$5:$F$5)),{"A","G","R"},{" Amber","Green","Red"})
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thanks - just the job!
Hi,
Just so that I can try and unpick how this formula works....
Can you let me know why the array formula at the end is required:
{"A","G","R"}.{"Amber","Green","Red"}))
Is this purely to cross reference the "R" in the table D6:F9 with "Red" so that Red is displayed rather than R.
If you simply wanted to display the values that are in D6:F9 would you need this bit?
Yes, you are correct, {"A","G","R"}.{"Amber","Green","Red"})) is part of the LOOKUP() function and basically translates the A,G,R to the respective full text colour names.... If you simply want the A,G or R displayed, then no need for the LOOKUP() function....
=INDEX($D$6:$F$9,MATCH(TRUE,INDEX($C$6:$C$9<=C15,0),0),MATCH(D15,$D$5:$F$5))
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks