More than 8 If statements in a command line in Excel

  • Thread starter Thread starter Bolivar
  • Start date Start date
B

Bolivar

I am trying to get the statement below to work in an excel spread sheet. I
need 5 more if statements to finish but each time I tack on the 9th
statement it errors out.

=IF(B271=1,(C68),IF(B271=2,(C69),IF(B271=3,(C70),IF(B271=4,(C71),IF(B271=5,(C72),IF(B271=6,(C73),IF(B271=7,(C74),IF(B271=8,(C75),""))))))))
 
I am trying to get the statement below to work in an excel spread sheet. I
need 5 more if statements to finish but each time I tack on the 9th
statement it errors out.

=IF(B271=1,(C68),IF(B271=2,(C69),IF(B271=3,(C70),IF(B271=4,(C71),IF(B271=5,(C72),IF(B271=6,(C73),IF(B271=7,(C74),IF(B271=8,(C75),""))))))))

You have posted this question to the wrong newsgroup.
The access in this groups title refers to Microsoft Access, a database
program.
Please repost to the correct newsgroup for the program you are using.
I would suggest you include your Windows and Office version number in
your message. It might make a difference.
 
ok first this is an access group and second congrats i thought he
limit was 7 not 8 oh right 7 nests so 8 total.

the error is a system error basically you cannot do it no matter what
you do simple as that.

and unfortunatally for you as far as i know excel dosnt have a case
switch so you have to use VBA code to do it. do some research on case
switch for vba for excel

http://www.mrexcel.com/archive2/10700/11962.htm

that will help you get started.

though you may be able to make a look up table and use vlookup or
hlookup for that bu thats just a guess.

Hope this helps

Regards
Kelvan
 
I am trying to get the statement below to work in an excel spread sheet. I
need 5 more if statements to finish but each time I tack on the 9th
statement it errors out.

=IF(B271=1,(C68),IF(B271=2,(C69),IF(B271=3,(C70),IF(B271=4,(C71),IF(B271=5,(C72),IF(B271=6,(C73),IF(B271=7,(C74),IF(B271=8,(C75),""))))))))

Take a look at the help for the Switch() function.
 
i coudlnt find switch in my version of excel and i am using 2000 i
supose it is just for later versions.

Regards
Kelvan
 
Back
Top