1

I have two sheets: in the first sheet there's a code that corresponds to a value of the second sheet, how do I replace the code with the value?

First Sheet

Name      Last name    Job
xxxx      xxxxxxxxx     3
xxxx      xxxxxxxxx     7
xxxx      xxxxxxxxx     5

Second sheet

Code   Job
  3   xxxxxx
  4   xxxxxx
  5   xxxxxx
  6   xxxxxx
  7   xxxxxx

How do I replace the job code in the first sheet with the corresponding job text of the second sheet?

  • What about not replacing it, but getting it by a formula (VLOOKUP), then hiding the original row? Worksheet functions can't modify values you've entered manually (like Job code in your case) – Máté Juhász Oct 13 '16 at 9:33
  • Welcome to Super User. Although we are happy to help, this is not a service site where we will do the work. Please add details of what you have tried so far, including scripts, code or formulas. Sometimes people are close to the answer and just don't know it. If you need more info about asking questions, check out How to Ask in the help center. – CharlieRB Oct 13 '16 at 11:53
1

You will need in the first sheet a new column, titled for example: Job Name and with the formula:

=VLOOKUP(C2,Sheet2!A2:C30,2,FALSE) 

Explanation of the function VLOOKUP

=VLOOKUP(lookup value, range containing the lookup value, the column number in the range containing the return value, TRUE for approximate match or FALSE for an exact match).

  • Thank you, this is the right solution. I already managed to find it but couldn't get it to work, then i spent some time looking into it and i found out that the cell range you select must include the return value aswell (i only included the cells where i wanted it to search for the code at first). – g0dl3ss Oct 14 '16 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.