Match and Index

rhmkrmi

Active Member
Joined
Aug 17, 2012
Messages
341
Office Version
  1. 365
Platform
  1. Windows
Hi there, I have created the following formula but it does not return the correct row number:

MATCH(INDEX(List!G1:G1000000,MATCH(P4,List!H1:H1000000,0)),Ref!W1:W1000000)

In sheet Ref, the row number that it should return is 38748 but it returns 38866.

The value is a number that is in row 38748 in column W.

When I try MATCH(INDEX(List!G:G,MATCH(P4,List!H:H,0)),Ref!W:W) it returns 36071 which is also wrong.

Thank you!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
try

MATCH(INDEX(List!G1:G1000000,MATCH(P4,List!H1:H1000000,0)),Ref!W1:W1000000,0)
 
Upvote 0
#N/A means no match.

can you confirm if the content in P4 also in List!G:G and Ref!W:W
 
Upvote 0
There is a match in row 38748 in sheet "Ref" column W.

P4 is in sheet "List" in row 18 column H and the values is matched in column G but when I try to match the value of column G sheet "List" in column W sheet "Ref", it returns #N/A using your version in post #2 .

Interestingly, when I hard code the lookup_value, it does find the exact match in sheet "Ref" column W as in MATCH(23595,Ref!W1:W1000000,0)

Thanks for your help again
 
Upvote 0
There is a match in row 38748 in sheet "Ref" column W.

P4 is in sheet "List" in row 18 column H and the values is matched in column G but when I try to match the value of column G sheet "List" in column W sheet "Ref", it returns #N/A using your version in post #2 .

Interestingly, when I hard code the lookup_value, it does find the exact match in sheet "Ref" column W as in MATCH(23595,Ref!W1:W1000000,0)

Thanks for your help again

so, it's likely that the 23595 in P4 has extra space in front or after. or formatted as text
try test in with len(P4), and
isnumber(P4)
 
Last edited:
Upvote 0
Are there Decimal Values as well in the array ???
Any possibilities to have Duplicate Values ??
Did you apply TRIM() yet.
 
Last edited:
Upvote 0
They are all numbers and there is no text or space but there are decimals and there are duplicates but in this particular example there is no duplicate.

I do the following:

MATCH(P4,List!H1:H1000000,0) and the result is correctly 18
INDEX(List!G1:G1000000,MATCH(P4,List!H1:H1000000,0)) and the result is correctly 23595
MATCH(INDEX(List!G1:G1000000,MATCH(P4,List!H1:H1000000,0)),Ref!W1:W1000000,0) and the result is incorrectly #N/A while it should be 38748

If I do MATCH(23595,Ref!W1:W1000000,0) I correctly get 38748
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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