I'm trying to grab the cell of an adjacent cell, based on the value in cell b42

cell b42 is an 8 digit cell, eg 24330182

Now column H between cell H5 and H32, contains data, with the final 8 digits in each cell being an 8 digit number,

e.g. cell h23= wednesday 24.06.06 aa 24330182

Now what I want to do is match the cell b42 to the correct cell in column h, and then once I know the correct cell, grab the value in adjacent column A

For example,

cell b42 = 32118273

Cell H11 = friday 19.93.05 cc 32118273

Therefore grab the value of A11

I was trying to use this formula, but it doesn't work

Code:

`=INDEX(A5:A32, MATCH(B42, RIGHT(H5:H32, 8)))`

any ideas what I'm doing wrong??