Reputation: 102
I have a excel sheet in the following format:
Sheet A contains
FilePath | Value1
E:\xampp\htdocs\D1.php | 1
E:\xampp\htdocs\D2.php | 1
Sheet B contains
FilePath | Value2
E:\xampp\htdocs\D2.php | 2
Output sheet:
Sheet C must contains
FilePath | Value1 | Value2
E:\xampp\htdocs\D1.php | 1 | #NA
E:\xampp\htdocs\D2.php | 1 | 2
To solve this I thought to add a new column in sheet A named "Value2" and then used VLOOKUP(A1,'SheetB'!A:B,1,FALSE) for row1, VLOOKUP(A2,'SheetB'!A:B,1,FALSE) for row2 and so on, but the output "#N/A" for all rows despite the fact that SheetB contains data for D2.php.
How can I resolve this? Is this is happening because cell values are "Absolute path"? Is there any other method?
Please help!
Upvotes: 0
Views: 49
Reputation: 35990
The #N/A error means that the lookup value cannot be found. Double check that the values are indeed a perfect match. There may be trailing spaces, for example.
Also, if you want to return the value, then the third parameter should be 2, not 1, since you want the value in the second column of the lookup range.
Upvotes: 1