VLOOKUP vs INDEX-MATCH

meppwc

Well-known Member
Joined
May 16, 2003
Messages
604
Office Version
  1. 365
Platform
  1. Windows
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)
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
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?
 
Upvote 0
this is a sample of the data
C84025681

all beings with letter C and ends with 8 numbers
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,174
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top