Nesting IF Statements Based on Same Cell Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Working on a 'dashboard' ... more like a traffic light, though, I think.

Based on the same cell value {F21) , these statements work fine when written
separately:
=IF(F21<0.02,"G",0)
=IF(AND(F21>0.02,F21<0.06),"Y",0)
=IF(F21>=0.06,"R",0)

How can I 'hook' them together as one string with one result?
 
=IF(F21<.02,"G",IF(F21<.06,"Y","R"))
assuming you really meant your 2nd equation to be ...F21>=.02, not just >.

Bob Umlas
Excel MVP
 
Bob Umlas wrote...
=IF(F21<.02,"G",IF(F21<.06,"Y","R"))
assuming you really meant your 2nd equation to be ...F21>=.02, not just >.
....

Or make it a lookup.

=LOOKUP(F21,{-1E307;0.02;0.06},{"G";"Y";"R"})
 
You may even want to use a conditional format for this. Access conditional
formatting for a cell by selecting the cell and selecting FORMAT ->
CONDITIONAL FORMATTING.
 
EXcellent ...Thanks, Bob!

Bob Umlas said:
=IF(F21<.02,"G",IF(F21<.06,"Y","R"))
assuming you really meant your 2nd equation to be ...F21>=.02, not just >.

Bob Umlas
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top