I think in your post when you say A2 you mean B1 and when you say A3 you mean
C1. This formula in C1 returns the desired values:
=IF(OR(A1=0,A1=1),1,IF(A1=2,3,IF(A1=8,5,IF(AND(OR(A1=3,A1=4),B1=2),4,IF(AND(OR(A1=3,A1=4),B1=3),5,"???")))))
Copy down through additional rows as required. Note the "???". You didn't
specify what should be returned if A1 has 3 or 4 and B1 has 8. Replace the
"???" in the formula with the correct return value.
Hope this helps,
Hutch
> I have updated the jTWSdump web-page with new information and
> examples.
[quoted text clipped - 8 lines]
>
> thanks.