So i have been playing with Excel for a while, and one thing led to another, i wanted to try this: How do i make the "Employee ID" cells in this Sheet here:
To refer to the "Employee ID" cells in this other Sheet?
Such that each employee in the first sheet have only their Employee ID rightfully and properly attached.
I have tried VLOOKUP but i keep getting N/A Errors despite my best efforts. Here is the Formula i tried in Excel:
The results returned was this:
Is there a solution to my predicament?
CodePudding user response:
You need index() with match() as vlookup cannot work to the left of its indexing column.
So try:
=index(Sheet2!A:A,match(B2,sheet2!B:B,0))
Typed without testing as you gave images not data.
CodePudding user response:
You could also use XLookup, a relatively new formula. E.g., =XLOOKUP(A2;Sheet2!A:A;Sheet2!B:B)