So do you only have 10 valid alphas ?
If as implied you have 16 chars then you can't store the result as a number per se given XL is limited to 15 significant digits
It's not really clear if you mean that there will be 15/16 digits in addition to alphas or in fact the 15/16 value equates to characters...
If you want to avoid VBA [you have to if you're using 2008 as VBA is not supported] I would suggest first creating a lookup table like so:
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
a 1
e 5
f 7
g 3
h 0
i 8
l 4
n 2
r 6
s 9
NOTES:
-- it is imperative that the numerics in E1:E10 are stored as Text and not numbers - ie '1 rather than 1
-- it is imperative that the data is sorted alphabetically
With the above in place, let's assume for sake of demo. in E1:F20, then assuming your alpha numeric string is in A1 then to get the numerical equivalent in B1:
=LEFT(SUMPRODUCT(LOOKUP(MID(A1&REPT("0",MAX(0,15-LEN(A1))),ROW(A$1:A$15),1),$E$1:$F$20),10^(15-ROW(A$1:A$15)))&SUMPRODUCT(LOOKUP(MID(A1&REPT("0",MAX(0,30-LEN(A1))),ROW(A$16:A$30),1),$E$1:$F$20),10^(15-ROW(A$1:A$15))),LEN(A1))
the above can be copied down if you have additional strings to "decode" in A2, A3 etc...
(if you don't want to store the lookup table in a range you can store via an inline array constant)
Bookmarks