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

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

Guest

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.
 
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: ""
 
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..
 
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)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top