Excel select row based on cell value, then select specific cell inside that row

10,694

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

Share:
10,694

Related videos on Youtube

g0dl3ss
Author by

g0dl3ss

Updated on September 18, 2022

Comments

  • g0dl3ss
    g0dl3ss over 1 year

    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?

    • Máté Juhász
      Máté Juhász over 7 years
      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)
    • CharlieRB
      CharlieRB over 7 years
      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.
  • g0dl3ss
    g0dl3ss over 7 years
    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).