Index Match using MID Function

mkron

New Member
Joined
Apr 5, 2017
Messages
18
Hello,

I am trying to grab reference drawing numbers from another sheet using a design id.
In the workbook that I want to add the drawing number to, the design id is formatted as FC1234567899 and in the workbook where I am matching, the design id is formatted as 12345678.

The current formula I have is :
=INDEX(Storage_Reference_Assy.xlsm!Table1[#Data], MATCH(MID([@[Design ID]], 3, 8), Storage_Reference_Assy.xlsm!Table1[Design ID], 0), 4)

This gives me #N/A in all of my rows. If I manually take off the FC and 99 in the table and use formula

=INDEX(Storage_Reference_Assy.xlsm!Table1[#Data], MATCH([@[Design ID]], Storage_Reference_Assy.xlsm!Table1[Design ID], 0), 4)

It works no problem.
I have tried adding "" around the MID function but that did not work either.

If you have any suggestions or tips, let me know.
Thanks!
MK
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi,

I believe the issue is that the MID function is returning a text response instead of a number which you are then trying to MATCH. Try adding -- before the MID so it looks like this:

Code:
=INDEX(Storage_Reference_Assy.xlsm!Table1[#Data], MATCH(--MID([@[Design ID]], 3, 8), Storage_Reference_Assy.xlsm!Table1[Design ID], 0), 4)
 
Upvote 0
Hey,

That worked perfectly, thank you!
-mk

Hi,

I believe the issue is that the MID function is returning a text response instead of a number which you are then trying to MATCH. Try adding -- before the MID so it looks like this:

Code:
=INDEX(Storage_Reference_Assy.xlsm!Table1[#Data], MATCH(--MID([@[Design ID]], 3, 8), Storage_Reference_Assy.xlsm!Table1[Design ID], 0), 4)
 
Upvote 0

Forum statistics

Threads
1,215,966
Messages
6,127,974
Members
449,414
Latest member
sameri

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