Ralph2
Industrial
- May 3, 2002
- 345
I am having trouble with the lookup function and hope someone can help me. A simplified Excel 207 spreadsheet:
red blue green yellow purple orange mauve pink black
150 200 250 300 350 400 450 500 550
Input cell(A3) Result cell B3
299.9 =LOOKUP(A3,A2:I2,A1:I1) returns green. 300 to 349.9 returns yellow
Can I have it return "closest to"? I.E. any value between 225 and 249 would return green.
When I try and use =HLOOKUP(A3,A2:I2,A1:I1)I get an #REF! error, why?
My understanding is that the HLOOKUP function compares the input value against the table array (left to right) and stops at the first instant the array number is larger than and displays the corresponding value in that column. Which, is what seems to be happening with my LOOKUP currently, what is the difference?
Thank you for your time.
red blue green yellow purple orange mauve pink black
150 200 250 300 350 400 450 500 550
Input cell(A3) Result cell B3
299.9 =LOOKUP(A3,A2:I2,A1:I1) returns green. 300 to 349.9 returns yellow
Can I have it return "closest to"? I.E. any value between 225 and 249 would return green.
When I try and use =HLOOKUP(A3,A2:I2,A1:I1)I get an #REF! error, why?
My understanding is that the HLOOKUP function compares the input value against the table array (left to right) and stops at the first instant the array number is larger than and displays the corresponding value in that column. Which, is what seems to be happening with my LOOKUP currently, what is the difference?
Thank you for your time.