VLookup or other?
Thank you, Karthik. This worked perfectly. I was hoping to use it in a
UserForm setting with VBA code, but this worked just as well.
Thank you for the assistance.
Mark
"Karthik Bhat - Bangalore" wrote in message
ups.com...
Hi Mark
It is possible using vlookup. But its bit complicated.. . and if you
want the answer here it is.
Let's assume that ur table is in sheet1 in first 3 columns. You need
to add two more columns to this; Just copy Columns A and B to columns D
and E. This is to enable all 3 vlookups.
In sheet2 say you want to enter of your search items in cells a2, b2,
and c2 for Name, Address, and Phone respectively. Enter the following
formulas in respective cells:
A3
=IF(ISNA(VLOOKUP(A2,Sheet1!A:E,1,0)),IF(ISNA(VLOOK UP(B2,Sheet1!B:E,3,0)),IF(ISNA(VLOOKUP(C2,Sheet1!C :E,2,0)),"Not
Found",VLOOKUP(C2,Sheet1!C:E,2,0)),(VLOOKUP(B2,She et1!B:E,3,0))),(VLOOKUP(A2,Sheet1!A:E,1,0)))
B3
=IF(ISNA(VLOOKUP(A2,Sheet1!A:E,2,0)),IF(ISNA(VLOOK UP(B2,Sheet1!B:E,1,0)),IF(ISNA(VLOOKUP(C2,Sheet1!C :E,3,0)),"Not
Found",VLOOKUP(C2,Sheet1!C:E,3,0)),(VLOOKUP(B2,She et1!B:E,1,0))),(VLOOKUP(A2,Sheet1!A:E,2,0)))
C3
=IF(ISNA(VLOOKUP(A2,Sheet1!A:E,3,0)),IF(ISNA(VLOOK UP(B2,Sheet1!B:E,2,0)),IF(ISNA(VLOOKUP(C2,Sheet1!C :E,1,0)),"Not
Found",VLOOKUP(C2,Sheet1!C:E,1,0)),(VLOOKUP(B2,She et1!B:E,2,0))),(VLOOKUP(A2,Sheet1!A:E,3,0)))
Now enter your search item in cell a2, b2, c2 as the case may be and if
there is a matching result it will come up in cells a3, b3 and c3.
Cells A1:C1 are for headings.
Thanks
Karthik Bhat
|