# INDEX MATCH + LEFT Function

#### gcefaloni

##### Board Regular
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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

#### mrshl9898

##### Well-known Member
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))

#### gcefaloni

##### Board Regular
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))
That works great. Thank you. I didn't think of reversing the problem.

#### AhoyNC

##### Well-known Member
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

1,089,438
Messages
5,408,221
Members
403,191
Latest member
fmstation