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"] &
Hope this helps.