Wny not use the MAX7219 library

Matrix library?

Then you just do mymatrix.write(row,column,HIGH); to turn an LED on.

(Maybe this is what you are doing, and the lookup table is to convert the int.)

From director, you can still send an int with the LED number, and call:

mymatrix.write(lednumber&7, lednumber >> 3, HIGH); // Turn on LED #lednumber

(You might have to swap the first two parameters if I got the row and column backwards)

lednumber&7 is the lower 3 bits of the LED number which is the row.

lednumber >> 3 is the next 3 bits of the LED number which is the column.

(lednumber >> 3 is the same as lednumber/8, but it might be faster.)