VLOOKUP vs INDEX-MATCH

meppwc

Active Member
Joined
May 16, 2003
Messages
422
I use vlookup all the time. For whatever reason it keeps returning #N/A on every cell.
I can only suspect that the data that was provided is somehow messed up
I want to try using INDEX MATCH instead of VLOOKUP to see if I get the wanted results.
I have never use INDEX MATCH and would appreciate assistance

I need equivalent of the VLOOKUP formula below using INDEX MATCH if someone can assist
=VLOOKUP(A2,D:H,4,FALSE)
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,042
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
It won't make any difference, but the equivalent would be:

=INDEX(G:G,MATCH(A2,D:D,0))

I suspect you have a data type mismatch or leadingt/trailing spaces. Are you looking up data thast looks like numbers?
 

meppwc

Active Member
Joined
May 16, 2003
Messages
422
this is a sample of the data
C84025681

all beings with letter C and ends with 8 numbers
 

SpillerBD

Well-known Member
Joined
Jul 2, 2014
Messages
2,706
Sometimes, depending on the source of one of the list, there may be a non-breaking space, CODE (0160), can be entered as SHIFT+SPACE
If you confirm an expected find exist, check the length of each string. If they look the same and have different LEN results it could be the non-breaking space, which is not removed with TRIM or CLEAN.

What looks like a space for the WHAT is a SHIFT+SPACE.
Code:
Sub Code_160()
'
' Code_160 Macro
'Removes all Characters of Code 0160 from Active WorkSheet
'This Character Code is often included in copied or downloaded
'spreadsheet data that interferes with Excel evaluations.
'Add to the QAT with suitable Icon. Suggestion is the "Unhappy" Face

    Cells.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
End Sub
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,042
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Then I'd suspect that you have something like leading or trailing spaces in one set of data and not the other, resulting in no match. Or you have calculation set to manual and filled the formula down so the result of the first formula is copied to every other cell pending a recalculation.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,816
Messages
5,470,965
Members
406,736
Latest member
hassan mohamed

This Week's Hot Topics

Top