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).
Related videos on Youtube
Author by
g0dl3ss
Updated on September 18, 2022Comments
-
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 over 7 yearsWhat 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 over 7 yearsWelcome 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 over 7 yearsThank 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).