Forum Discussion

cranderson2's avatar
cranderson2
Copper Contributor
Apr 02, 2024

VLOOKUP / Index Match returning different AND incorrect data

My VLOOKUP and Index Match functions are pulling different data, and both are incorrect data (not errors). This is a spreadsheet that has State and County data (example: State - Illinois, County - Cook, Hours - 8am-4pm). I am unable to share the spreadsheet/data due to confidentialty. 

 

The lookup value is from a dropdown box that populates the county in the format of State_County (as there are multiple Jackson counties in different states, for example). 

Example 1:

Index Match is looking for info for AK_Anchorage, the results instead pull data for AL_Autauga

 

Example 2:

VLOOKUP is looking for info for AK_Anchorage, the results instead pull data for WI_Wood. Please note, data only pulls when using TRUE. Using FALSE gives the #N/A error

 

I pulled a small sample size (20 counties from Alabama) of the data and moved it to an entirely new workbook. The data was copy/pasted into a notepad, then copy/pasted into the new workbook. I did a test VLOOKUP for Autauga, AL and it returned the #N/A error, which it shouldn't as Autauga was in the sample size. I then did a search for Yuba, CA (which should provide an #N/A error since the countie wasn't present in the data), but it instead returned a result for Autauga, AL.

 

I suspect it has to be a data issue since both the VLOOKUP and Index Match are returning results, but I can't figure out 1) how two search functions using the lookup value could provide different results and 2) how to fix that issue. 

 

Any help would be appreciated

 

 

 

Resources