How to change number to text in new column from another worksheet?

L

Lynn

Worksheet 1 : Contains information in numbers eg. 123456
Worksheet 2 : Contains information in numbers eg 123456 and belongs to James.

I need to add text eg 'James' next to that number eg.'123456' in Worksheet
1 and in a new column. The numbers may repeat within the worksheet 1.
Therefore, i need excel to run the selection and changes automatically.

How can i do that? What sort of formating or tools that i need to use?
Really appreciate if you could help me. Thank you in advance.
 
M

Max

One way ..

In Sheet2, assume the numbers are col A,
corresponding names in col B

In Sheet1, assume the numbers are running in A2 down,
and we want the names extracted in col B

Put in B2:

=IF(ISNA(MATCH(A2,Sheet2!A:A,0)),"",
INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0)))
Copy B2 down

Unmatched numbers (if any) will return blanks: ""
 
L

Lynn

Thank you so much max... really appreciate your help.. it worked!! but, there
is a slight problem.. it has this message stated in visual basic :
Compile error :
Expected:List seperator or )

But i followed exactly what you have wrote. Really appreciate your help.

Thank you..
 
M

Max

Not very sure what's happening with the "slight problem", Lynn,
but try this version with commas replaced by semicolons

=IF(ISNA(MATCH(A2;Sheet2!A:A;0));"";
INDEX(Sheet2!B:B;MATCH(A2;Sheet2!A:A;0)))
 
Top