How to pull in status based on text string and number range

lilvictorian

New Member
Joined
Jan 30, 2013
Messages
8
Hello,

I have a table which includes statuses (red, yellow, green) which is based on two criterion: Stage and Days. The number of days for each of the statuses varies by the stage. I'm trying to find the easiest way to pull in the Status when I have the Stage and Days.

I've included two screenshots to illustrate:
1. Status Table
2. Tracking File (includes desired results)

Any help would be greatly appreciated!
 

Attachments

  • Status_Table.png
    Status_Table.png
    8.5 KB · Views: 14
  • Tracker_with_desired_result.png
    Tracker_with_desired_result.png
    11 KB · Views: 13

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi Lilvictorian,

A big nested IF formula to determine the colour and some conditonal formatting on the cells to colour them...

Excel Formula:
=IF(G5="A",IF(H5<5,"Green",IF(H5>5,"Red","Yellow")),IF(G5="B",IF(H5<20,"Green",IF(H5>30,"Red","Yellow")),IF(G5="C",IF(H5<63,"Green",IF(H5>70,"Red","Yellow")),IF(G5="D",IF(H5<73,"Green",IF(H5>80,"Red","Yellow")),IF(G5="E",IF(H5<83,"Green",IF(H5>90,"Red","Yellow")),"")))))

I have put the above in to cell J5 in my sheet to check the results against your example. However are the criteria for green correct for stage C, D and E? Only they look as though they should be the lower limit for yellow. If not for stage C 68 would be true for both green and yellow as an example. Have taken a chance and put the lower value in to the formula for green.

1623110975698.png


Steven
 
Upvote 0
Solution
Steven - Thanks for you help and for catching my error. I was planning on doing it the way you suggested. I thought maybe there was an easier way using Offset, but this will work for me. Thank you again!
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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