ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Fiveif statements in a formula (https://www.excelbanter.com/excel-worksheet-functions/100287-fiveif-statements-formula.html)

BillS

Fiveif statements in a formula
 
I want to check a cell for one of five responses from a deeop down list. The
if works fine for up to four but the fifth is not allowed. Below is the
formula that works. belo0w that is the fifth condition I want to check for.
Any suggestions?
Thanks

=IF(Survey!E8:E8="Agree","1",IF(Survey!E8:E8="Some what
Agree","2",IF(Survey!E8:E8="Somewhat
Disagree","3",IF(Survey!E8:E8="Disagree","4"))))


IF(Survey!E8:E8="Not Aplicable","0")


Biff

Fiveif statements in a formula
 
Hi!

What do you mean by "is not allowed" ?

It works for me:

=IF(Survey!E8="Agree",1,IF(Survey!E8="Somewhat
Agree",2,IF(Survey!E8="Somewhat
Disagree",3,IF(Survey!E8="Disagree",4,IF(Survey!E8 ="Not Aplicable",0,"")))))

Some alternatives:

=VLOOKUP(Survey!E8,{"Agree",1;"Somewhat Agree",2;"Somewhat
Disagree",3;"Disagree",4;"Not Aplicable",0},2,0)

=IF(Survey!E8="Not Aplicable",0,MATCH(Survey!E8,{"Agree","Somewhat
Agree","Somewhat Disagree","Disagree"},0))

Check your spelling on "Aplicable"!

Biff

"BillS" wrote in message
...
I want to check a cell for one of five responses from a deeop down list.
The
if works fine for up to four but the fifth is not allowed. Below is the
formula that works. belo0w that is the fifth condition I want to check
for.
Any suggestions?
Thanks

=IF(Survey!E8:E8="Agree","1",IF(Survey!E8:E8="Some what
Agree","2",IF(Survey!E8:E8="Somewhat
Disagree","3",IF(Survey!E8:E8="Disagree","4"))))


IF(Survey!E8:E8="Not Aplicable","0")





All times are GMT +1. The time now is 04:07 PM.

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