PDA

View Full Version : Solved: IF...Then...Else



OhGorgeous1
02-25-2009, 08:15 AM
Hi all

I have the following formula in one cell that is repeated over a complete worksheet (from Current!G15.......to G97 and so on)

=IF($B$9=1,Current!G15,IF($B$9=2,Current!H15,IF($B$9=3,Current!I15,IF($B$9= 4,Current!J15,IF($B$9=5,Current!K15,IF($B$9=6,Current!L15,,IF($B$9=7,Curren t!M15,IF($B$9=8,Current!N15,IF($B$9=9,Current!O15,IF($B$9=10,Current!P15,IF ($B$9=11,Current!Q15,IF($B$9=12,Current!R15,IF($B$9=13,Current!S15,IF($B$9= 14,Current!T15,IF($B$9=15,Current!U15,IF($B$9=16,Current!V15,IF($B$9=17,Cur rent!W15,IF($B$9=18,Current!X15,IF($B$9=19,Current!Y15,Current!Z15))))))))) ))))))))))

but have the problem that Excel only allows 7 IF Statements per cell can anyone help me on this, I would be very grateful. : pray2:

nst1107
02-25-2009, 09:06 AM
Try splitting the formula into more than one cell.

david000
02-25-2009, 09:09 AM
http://www.cpearson.com/excel/nested.htm

Here is a link with some good work-a-rounds.

OhGorgeous1
02-25-2009, 09:23 AM
http://www.cpearson.com/excel/nested.htm

Here is a link with some good work-a-rounds.

thanks for this david000 I will let you know how I get on, it will take a little while to put in place before I can test.

Bob Phillips
02-25-2009, 10:12 AM
=INDEX(Current!G15:Z15,1,B$9)

OhGorgeous1
02-26-2009, 12:21 AM
=INDEX(Current!G15:Z15,1,B$9)

As always XLD you are the man! Many thanks that works a dream. :clap: