Not sure, but maybe as a start, you could try something along these lines
using VLOOKUP and CODE() ?
Assume the sample (numeric) data below is
in Sheet1 cols A and B,
with the numeric refcodes in col A
RefCode Field1
65 Text1
66 Text2
67 Text3
etc
And you have in Sheet2,
the alphas as the RefCodes in col A
RefCode Field1
A Text1
B Text2
C Text3
etc
Put 2 labels into C1

1 : Compare, Result
Put in C2: =VLOOKUP(CODE(TRIM(A2)),Sheet1!A:B,2,0)
Put in D2: =TRIM(B2)=TRIM(C2)
Select C2

2 and fill down
Col C ("Compare") extracts over the matched items for the RefCodes (A,B,C)
from the col Field1 in Sheet1 for comparison, while col D (Result") gives
the result of the comparison of col C with what you have in col B in Sheet2
(TRUE = yes, matched ; FALSE = no, does not match)
For the sample data above, what you'll get is:
RefCode Field1 Compare Result
A Text1 Text1 TRUE
B Text2 Text2 TRUE
C Text3 Text3 TRUE
etc