Many thanks, altough I couldn't use arraywrite, lookup2 and DIG combination solved it
Actually I checked lookup2 before but I think I misread it's explanation, I was thinking that lookup2 is for 16bit table. I was totally wrong XD