lookup problem

  • Thread starter Thread starter ims
  • Start date Start date
I

ims

Dear all,

I have a problem, i want to lookup something

A B C
1 ab uv 5
2 hi ab 7
3 xy sd 8

if i use the formula =lookup(A1,B:B,C:C), it returns a "7"
but if the formula is =lookup(A2,B:B,C:C), since there is no "hi" in column
B
I want the formula return a blank cell, but not a "7"
how the formula should be?

thanks

ims
 
ims said:
Dear all,

I have a problem, i want to lookup something

A B C
1 ab uv 5
2 hi ab 7
3 xy sd 8

if i use the formula =lookup(A1,B:B,C:C), it returns a "7"
but if the formula is =lookup(A2,B:B,C:C), since there is no "hi" in column
B
I want the formula return a blank cell, but not a "7"
how the formula should be?

Try this formula:
=IF(ISNA(VLOOKUP(A2,B:C,2,0)),"",VLOOKUP(A2,B:C,2,0))
 
Back
Top