Automating search and replace

  • Thread starter Thread starter Wellman
  • Start date Start date
W

Wellman

I'm trying to do something simple, yet I can't figure it out.

I have two spreadsheet. One includes company names and "codes":

QWE843 | Apple
FER244 | Dell
RWT224 | HP

and so on.

In another spreadsheet I have a list of people from each company, but
instead of the company name, they have their company code:

QWE843 | Joe Doe
FER244 | Mary Monson
QWE843 | Steve Jobs
FER244 | Donald Duck

What I'd like to do is to add a column with the company names in the second
spreadsheet, taking the first spreadsheet as a reference. So, the end result
would be

QWE843 | Joe Doe | Apple
FER244 | Mary Monson | Dell
QWE843 | Steve Jobs | Apple
FER244 | Donald Duck | Dell

I tried with if, then, if, then... but it's too many parameters (there are
about 300 different company codes). Is this doable?

Thanks!

M.
 
Try this in column C of your second sheet:

=VLOOKUP(A1,Sheet1!A:B,2,0)

and copy down for as many names as you have.

Hope this helps.

Pete
 
Assuming the complete list in Sheet1 Col A & B
and the details in Sheet2 A-B then put this in Sheet 2 C1 and copy down

=VLOOKUP(A1,Sheet1!A:B,2,false)
 

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