Aladin
First thank you very much for responding.
My initial syntax was =INDEX(List1,MATCH(AF81,List2,),2)
This was used to lookup the individual code for debtor and creditor.
It worked fine when the cells are input with the respective debtor
and creditor name but my account trial balance consist not only of
debtors and creditors names but also others. When this is input with
the debtor/creditor it will show correctly the respective code but
other names or dash will show #N/A.
On using =IF(ISNUMBER(MATCH(AF81,List2,0)),INDEX(List1,MATCH(AF81,List2,0)),"-")
it also worked on debtors/creditors perfectly plus certain cells but will also throw
up #REF
This has really got me floored