LOOKUP vs IF programming question

T

tcek

I need to use the LOOKUP (V, H or other) because I have exhausted my IF
statement allowances in the cell. this is what i want to do.

I have two conditions..Look in cell c10 and look in cell c12. Depending on
what those are the values in d10 and d11 will change.

i have a validation list for c10 and c 12. I have corresponding values in a
table for d10 and d11 (depending on c10 and c12).

for example: if c10 = "grey" (from a choice of grey, black, blue) and c12 =
"small" (from a choice of small, large, short, tall, fat, skinny, up, down)
then d10 = "28" and d11 = "5".

d10 and d11 will changed depending on what is in c10 and c12. the particular
changes are outlined in a table that specifies d10 and d11. the table has
four columns: c10 choice,c12 choice, d10 result, d11 result
 
G

Glenn

tcek said:
I need to use the LOOKUP (V, H or other) because I have exhausted my IF
statement allowances in the cell. this is what i want to do.

I have two conditions..Look in cell c10 and look in cell c12. Depending on
what those are the values in d10 and d11 will change.

i have a validation list for c10 and c 12. I have corresponding values in a
table for d10 and d11 (depending on c10 and c12).

for example: if c10 = "grey" (from a choice of grey, black, blue) and c12 =
"small" (from a choice of small, large, short, tall, fat, skinny, up, down)
then d10 = "28" and d11 = "5".

d10 and d11 will changed depending on what is in c10 and c12. the particular
changes are outlined in a table that specifies d10 and d11. the table has
four columns: c10 choice,c12 choice, d10 result, d11 result


Maybe you could try a new setup. Name an empty sheet "D10_Sheet". Put your C10
choices across row 1 starting in column B. Put your C12 choices down column A
starting in row 2. Put the D10 result at the intersection of those rows and
columns. Do the same for "D11_Sheet".

Put the following formula in D10 on your original sheet:

=INDEX(D10_Sheet!1:65536,MATCH(C12,D10_Sheet!A:A,0),MATCH(C10,D10_Sheet!1:1,0))

And the obvious adjustments for D11.
 
T

tcek

what is the "65536" stand for in the statement?

Glenn said:
Maybe you could try a new setup. Name an empty sheet "D10_Sheet". Put your C10
choices across row 1 starting in column B. Put your C12 choices down column A
starting in row 2. Put the D10 result at the intersection of those rows and
columns. Do the same for "D11_Sheet".

Put the following formula in D10 on your original sheet:

=INDEX(D10_Sheet!1:65536,MATCH(C12,D10_Sheet!A:A,0),MATCH(C10,D10_Sheet!1:1,0))

And the obvious adjustments for D11.
 
G

Glenn

It is a row number. When I selected the entire sheet by clicking on the square
above the "1" and left of the "A", Excel put in the "D10_Sheet!1:65536".
 
T

tcek

This worked very well..thanks

Glenn said:
It is a row number. When I selected the entire sheet by clicking on the square
above the "1" and left of the "A", Excel put in the "D10_Sheet!1:65536".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top