Skip to main content
1 of 3
Edmund
  • 43.2k
  • 3
  • 53
  • 148

You may use QuotientRemainder with FromLetterNumber and a bit of recursion.

ClearAll[baseAlphabetForm]
SetAttributes[baseAlphabetForm, Listable];
baseAlphabetForm[expr_Integer?NonNegative] :=
  If[
  expr == 0
  , ""
  , Module[
   {q, r}
   , {q, r} = QuotientRemainder[expr, 26]
   ; If[r == 0, (q -= 1; r = 26;)]
   ; StringJoin[{baseAlphabetForm[q], ToUpperCase@FromLetterNumber[r]}]
     ]
   ]

Then

baseAlphabetForm[10]
"J"

and

baseAlphabetForm[1000000]
"BDWGN"

and

baseAlphabetForm[Range[100]] //
 Multicolumn[#, Frame -> All, Appearance -> "Horizontal"] &

Mathematica graphics

Hope this helps.

Edmund
  • 43.2k
  • 3
  • 53
  • 148