2

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?

2
  • 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) Oct 13, 2016 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, 2016 at 11:53

1 Answer 1

2

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

1
  • 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, 2016 at 11:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .