SOLVED

Highlighted
New Contributor

# Excel - Index Match Formula

Hi Guys,

I need help related to Index and Match formula, I am getting #N/A value from match getting the row number, I'm a beginner in writing this kind of formula so appreciate any help from the community.

Please see below formula I tried to run, Orange color is my array table range for the index, Red color is my row_num formula wherein I'm trying to get the left character of A2 value which contains 2 characters, it will be either a letter or a number. Blue color is my column_num formula wherein I'm trying to get the right character of A2 value which also contains either a number or a letter.

=INDEX('S-Box'!B2:Q17,MATCH(IF(ISNUMBER(A2),INT(LEFT(A2)),TEXT(LEFT(A2),0)),'S-Box'!A2:A17,0),MATCH(IF(ISNUMBER(A2),INT(VALUE(RIGHT(A2))),TEXT(RIGHT(A2),0)),'S-Box'!B1:Q1,0))

It is on the red formula I'm getting the #N/A error, I tried different method but seems I can only make it work when I tried to split the formula and not run it together.

I appreciate any help from you guys and I attached my sample file. Thanks

3 Replies
Highlighted
Solution

# Re: Excel - Index Match Formula

I'd suggest

``=INDEX('S-Box'!\$B\$2:\$Q\$17,HEX2DEC(LEFT(A2))+1,HEX2DEC(RIGHT(A2))+1)``

Highlighted

# Re: Excel - Index Match Formula

Many thanks @Sergei Baklan it works... Appreciate your help...
Highlighted

# Re: Excel - Index Match Formula

@elsu186 , you are welcome, glad to help