ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nesting IF Statements Based on Same Cell Value (https://www.excelbanter.com/excel-worksheet-functions/28036-nesting-if-statements-based-same-cell-value.html)

Cheryl B.

Nesting IF Statements Based on Same Cell Value
 
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(F210.02,F21<0.06),"Y",0)
=IF(F21=0.06,"R",0)

How can I 'hook' them together as one string with one result?


Bob Umlas

=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

"Cheryl B." wrote in message
...
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(F210.02,F21<0.06),"Y",0)
=IF(F21=0.06,"R",0)

How can I 'hook' them together as one string with one result?




Harlan Grove

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"})


Barb 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.

"Cheryl B." wrote:

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(F210.02,F21<0.06),"Y",0)
=IF(F21=0.06,"R",0)

How can I 'hook' them together as one string with one result?


Cheryl B.

EXcellent ...Thanks, Bob!

"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 .

Bob Umlas
Excel MVP

"Cheryl B." wrote in message
...
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(F210.02,F21<0.06),"Y",0)
=IF(F21=0.06,"R",0)

How can I 'hook' them together as one string with one result?






All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com