Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like if someone can give me the numerical indices of the Microsoft Excel alphabetical indices.

It Is as follows: $A$ is $1$ and $Z$ is $26$ then the indices starts from $AA=27$, $AB=28$ to $ZZ$ and then from $AAA$ to $ZZZ$. Given an index like $AGVYD$, how can I calculate its numerical Index?

share|cite|improve this question
up vote 6 down vote accepted

One way to think about the labeling system is as a new number system. This number system is base-26, and each 'digit' is replaced by a letter.

In base-ten, the number '123' means:

$$1*10^2 + 2*10^1 + 3*10^0$$

In our new excel-version base-26 'ABCD' means:

$$(A=1)*26^3 + (B=2)*26^2 + (C=3)*26^1 + (D=4)*26^0$$

share|cite|improve this answer
\cdot to get $\cdot$ – Git Gud Mar 2 '13 at 13:21
Note that this is a somewhat weird version of base-26, since it lacks a digit for 0 but does have a digit (Z) with the value 26. Still, your decoding formula does work. – Ilmari Karonen Mar 2 '13 at 13:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.