Alternative to Index Match

benwork

Board Regular
Joined
Oct 8, 2010
Messages
69
Hi all

Im using index match for text based values

=INDEX('sheet1'!$J$2:$J$30000,MATCH($B4, IF('sheet1'!$G$2:$G$30000=C4,'sheet1'!$H$2:$H$30000)))

The formula works great .. most of the time, although I have noticed sometimes it brings back ... random data. I dont understand why this is happening. I have checked the data to see if it is duplicated or soemthing like that. But havnt had any luck.

I would try a sumproduct except for the fact the cells are text based.

Any ideas ??

Cheers

Ben
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Maybe you need an exact match:

=INDEX(Sheet1!$J$2:$J$30000,MATCH($B4, IF(Sheet1!$G$2:$G$30000=C4,Sheet1!$H$2:$H$30000),FALSE))
 
Upvote 0
I don't see the point of the IF() inclusion. Are you trying to do a Two-column Match? Maybe:

=INDEX('sheet1'!$J$2:$J$30000,MATCH($B4 & "-" & $C4, INDEX('sheet1'!$G$2:$G$30000 & "-" & 'sheet1'!$H$2:$H$30000, 0), 0)

If that formula is too cumbersome on your sheet, then consider adding another column to your sheet1 to concatenate these two values into a single matchable string. If you put this formula on sheet1 in AA2 and copied down:

=$G2 & "-" & $H2

Then the formula above simplifies down to:

=INDEX('sheet1'!$J:$J, MATCH($B4 & "-" & $C4, 'sheet1'!$AA:$AA , 0)
 
Upvote 0
Yes, Im trying to do a 2 column match.

It normally works quite well, although for some reason I cant get it working.

I tried doing the forumla that you suggest but couldnt get it working

Is this correct ?


=INDEX(Sheet1!$J$2:$J$30000,MATCH($B4&"-"&$C4,INDEX(Sheet1!$G$2:$G$30000&"-"&Sheet1!$H$2:$H$30000,0),0))
 
Upvote 0
The formula is right, but I just tried that and it is WAY too cumbersome if you're going to be putting many of these on your Sheet2. Please use the second suggestion to create a helper key column.
 
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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