![]() |
Problem with IF condition or vector lookup?
Inserting more than 8 conditions into one cell?
Hi, I'm trying a basic look of 8 conditions, but it seems that the formula is too long. I've tried to use lookup but I can't get it to show the cell results instead of a specific number or letter. I'm just trying to do this in one cell (i.e in cell C16): if cell A13=1 show result content of cell B54 if cell A13=2 show result content of cell C54 if cell A13=3 show result content of cell D54 if cell A13=4 show result content of cell E54 if cell A13=5 show result content of cell F54 if cell A13=6 show result content of cell G54 if cell A13=7 show result content of cell H54 if cell A13=8 show result content of cell I54 I just can't get it to work. Anybody could tell me what the formula in cell C16 should look like? Thanks a lot J-Philippe |
Try this:
=CHOOSE(A13,B54,C54,D54,E54,F54,G54,H54,I54) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "J-Philippe" wrote in message ... Inserting more than 8 conditions into one cell? Hi, I'm trying a basic look of 8 conditions, but it seems that the formula is too long. I've tried to use lookup but I can't get it to show the cell results instead of a specific number or letter. I'm just trying to do this in one cell (i.e in cell C16): if cell A13=1 show result content of cell B54 if cell A13=2 show result content of cell C54 if cell A13=3 show result content of cell D54 if cell A13=4 show result content of cell E54 if cell A13=5 show result content of cell F54 if cell A13=6 show result content of cell G54 if cell A13=7 show result content of cell H54 if cell A13=8 show result content of cell I54 I just can't get it to work. Anybody could tell me what the formula in cell C16 should look like? Thanks a lot J-Philippe |
=IF(OR(A13={1,2,3,4,5,6,7,8}),INDIRECT(CHAR(CODE(A 13)+17)&"54"),"error")
HTH Jason Atlanta, GA "J-Philippe" wrote: Inserting more than 8 conditions into one cell? Hi, I'm trying a basic look of 8 conditions, but it seems that the formula is too long. I've tried to use lookup but I can't get it to show the cell results instead of a specific number or letter. I'm just trying to do this in one cell (i.e in cell C16): if cell A13=1 show result content of cell B54 if cell A13=2 show result content of cell C54 if cell A13=3 show result content of cell D54 if cell A13=4 show result content of cell E54 if cell A13=5 show result content of cell F54 if cell A13=6 show result content of cell G54 if cell A13=7 show result content of cell H54 if cell A13=8 show result content of cell I54 I just can't get it to work. Anybody could tell me what the formula in cell C16 should look like? Thanks a lot J-Philippe |
A prominent case for INDEX()...
=INDEX(B54:I54,A13) J-Philippe wrote: Inserting more than 8 conditions into one cell? Hi, I'm trying a basic look of 8 conditions, but it seems that the formula is too long. I've tried to use lookup but I can't get it to show the cell results instead of a specific number or letter. I'm just trying to do this in one cell (i.e in cell C16): if cell A13=1 show result content of cell B54 if cell A13=2 show result content of cell C54 if cell A13=3 show result content of cell D54 if cell A13=4 show result content of cell E54 if cell A13=5 show result content of cell F54 if cell A13=6 show result content of cell G54 if cell A13=7 show result content of cell H54 if cell A13=8 show result content of cell I54 I just can't get it to work. Anybody could tell me what the formula in cell C16 should look like? Thanks a lot J-Philippe |
Thanks all for your quick reply and great help.
The Index solution works perfectly. J-Philippe "Aladin Akyurek" wrote: A prominent case for INDEX()... =INDEX(B54:I54,A13) J-Philippe wrote: Inserting more than 8 conditions into one cell? Hi, I'm trying a basic look of 8 conditions, but it seems that the formula is too long. I've tried to use lookup but I can't get it to show the cell results instead of a specific number or letter. I'm just trying to do this in one cell (i.e in cell C16): if cell A13=1 show result content of cell B54 if cell A13=2 show result content of cell C54 if cell A13=3 show result content of cell D54 if cell A13=4 show result content of cell E54 if cell A13=5 show result content of cell F54 if cell A13=6 show result content of cell G54 if cell A13=7 show result content of cell H54 if cell A13=8 show result content of cell I54 I just can't get it to work. Anybody could tell me what the formula in cell C16 should look like? Thanks a lot J-Philippe |
All times are GMT +1. The time now is 10:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com