Forum Discussion
Vlookup unable to fetch desired values
Could you attach a small sample workbook demonstrating the problem (without sensitive data), with the formula you tried, or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
Hello Hans,
I uploaded the sample data where in I am trying to get values(DB_NAME) from "sheet 2" and you may discover that few rows , it's pulling up the values while other rows , it does shows #NA and which is where I am just trying to find a way to populate values from sheet 2.
Regards
- HansVogelaarMay 18, 2023MVP
The lookup is fairly useless, since the Host_name column on Sheet2 contains large numbers of duplicate values while the corresponding DB_Name values are different. VLOOKUP will simply return the first match that it encounters.
Apart from that, your lookup range in the formula in B2 is Sheet2!A1:B331. This is a relative reference, so it changes when you fill or copy the formula down. You should use Sheet2!$A$1:$B$331 (or use a named range or a table). You'll still have a few #N/A:
In B9 because there is no Host_name sw337 on Sheet2.
In B10 because there is no Host_name eluxd06 on Sheet2.
- AlokBeheriaMay 18, 2023Brass ContributorThanks for your inputs. So, in that case , is there any other function which can simply search values based on search criteria irrespective of duplicates ?
- HansVogelaarMay 18, 2023MVP
Please explain in detail what you want the result to be.