Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
J-Philippe
 
Posts: n/a
Default 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

  #2   Report Post  
RagDyeR
 
Posts: n/a
Default

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


  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

=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

  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

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

  #5   Report Post  
J-Philippe
 
Posts: n/a
Default

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 06:33 PM
Baffling formula problem Ken Schmidt Excel Discussion (Misc queries) 2 December 21st 04 08:52 AM
Paper Tray selection Problem, Michael Hoffmann Excel Discussion (Misc queries) 4 December 3rd 04 10:08 PM
Add condition to formula Pat Excel Worksheet Functions 0 November 16th 04 01:23 PM
Problem with Pivot Table Drop-Down Menus Mac Excel Worksheet Functions 4 November 7th 04 02:18 PM


All times are GMT +1. The time now is 06:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"