Hi Mark,
Rows run left to right, and are labeled with numbers.
Columns run top to bottom, and are labeled with letters.
Your reference columns include single letters in column A, with the associated number in the same row of column B,
and letter pairs in some rows of column C, with the associated number in column D.
There does not appear to be a mathematical pattern by which the number associated with each letter is determined, so it would be difficult to provide a means of calculating each number based on each letter (or letter pair).
What you have created in the first four columns is a pair of lookup tables in which you can look up a letter and find the corresponding number.
The lookup table can be removed from the six column table you have, and can be placed on a separate sheet if desired; it does not need to be attached to the 'working' table currently occupying columns F and G. The lookup formula will be simpler if the lookup table is reduced to two columns, rather than the four you are using.
In the example below, I have used the letter to number equivalents visible on your table, and arbitrarily assigned the number corresponding to each letter's position in the English language alphabet for letters not visible in your sample. I've included only the two two-letter combinations that are shown in your example.

Main is the equivalent of columns F and G of your table.
Lookup contains the data from columns A and B of your table, plus the current data from columns C and D of your table.
Lookup contains no formulas. All data is entered directly.
Main contains one formula, entered in cell B2, then filled down to the end of column B.
B2: =IF(LEN(A)<1,"",INDEX(Lookup::B,MATCH(A2,Lookup::A,0)))
The core formula that does the lookup is shown in bold. The core is entered as the if-false part of an IF statement that tests for an entry in column A by measuring the LENgth (in number of characters) of what is displayed in column A. If the length is less than one character, IF returns a null string, and exits the formula. If there is on or more character in A, IF calls the INDEX formula.
In the INDEX formula, MATCH looks in column A of Lookup for the value in A2 of Main. If it finds a match, it returns a number indicating the position of the matching item in the list in column A, and passes it on to INDEX.
INDEX counts that many items down the list in column B and returns the value it finds at that position.
Note the error triangle in the third last row of Main. This is flagging a 'can't find' error thrown by MATCH when it could not find the value "AA" in the search area, column A of Lookup.
Regards,
Barry