INDEX MATCH + LEFT Function

gcefaloni

Board Regular
Joined
Mar 15, 2016
Messages
119
Hi,

I'm trying to go from the top formula to the bottom one. I have to match H9 (which is a string of 8 characters) to column A which has the same set of information as in column H but with an added number at the end. So I need to be able to match H9 to the leftmost 8 characters in column A. I tried to use an array formula as shown in the example below but it doesn't seem to work. What can I adjust in order for this to work out?

=INDEX($A$9:$B$1000,MATCH(H9,$A$9:$A$1000,0),MATCH(I$8,$A$8:$B$8,0))

={INDEX($A$9:$B$1000,MATCH(H9,LEFT($A$9:$A$1000,8),0),MATCH(I$8,$A$8:$B$8,0))}

Thank you!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try adding a wildcard to the search *

You can't LEFT a range.

=INDEX($A$9:$B$1000,MATCH(H9&"*",$A$9:$A$1000,0),MATCH(I$8,$A$8:$B$8,0))
 
Upvote 0
Even though I would go with the formula from mrsh9898, you can use LEFT on a range. As long as you entered your formula as an array with CTRL-SHIFT-ENTER it should have worked (see below cell I9). You could have also used the AGGREGATE function with LEFT as in cell I10 (you would enter this the standard way with just ENTER).
Excel Workbook
ABCGHI
8Item1Item2Item2
9wertyuio1qhhhytrewd
10rtyuiopl2sd
11hhhytrew5d
12qwertyui6g
Sheet
 
Upvote 0

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

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