Lookup and IF functions I think?? Need Help!!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Below is a sample of the details I want to display

A B
1 CODE1 DISPLAY1
2 CODE2 DISPLAY2
3 CODE3 DISPLAY3

I want to display the corresponding value in column B in E7 (see below), if
one of the three cells E4:E6 displays that code.

E
4 BLANK CELL
5 CODE2
6 BLANK CELL
7 DISPLAY2

can this be done, and how would it be done??
 
=IF(COUNTA(A4:A6)=0,"",VLOOKUP(IF(A4<>"",A4,IF(A5<>"",A5,A6)),A1:B3,2,FALSE))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Maybe this in E7

=IF(ISNA(VLOOKUP(E5,A1:B3,2,FALSE)),"",VLOOKUP(E5,A1:B3,2,FALSE))


if you not bothered about the #NA error if the lookup value isnt found then
the formula can be shortened to

=VLOOKUP(E5,A1:B3,2,FALSE)

Mike
 
Back
Top