Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
a. The standard defines a cell reference to be any string.
A single cell reference consists of a column name immediately followed by a row number. The column name is encoded using one, two, or three capital letters in US English locale:
<letter> ::= “A” | “B” | “C” | “D” | “E” | “F” | “G” | “H” | “I” | “J” | “K” | “L” | “M” | “N” | “O” | “P” | “Q” | “R” | “S” | “T” | “U” | “V” | “W” | “X” | “Y” | “Z”
<column name> ::= <letter> | <letter> <letter> | <letter> <letter> <letter>
<cell reference> ::= <column name> <row number>
The row number is an integer in the range from 1 to 1048576.
Assume that the letter “A” corresponds to the numeric value 1, the letter “B” – to the numeric value 2, and so on, and the letter “Z” corresponding to the numeric value 26. Further assume that <letter N> designates the letter in position N of the column name, counting from the right, with a missing letter corresponding to the numeric value 0. The column number then can be expressed as follows:
<column number> = 676*<letter 3> + 26*<letter 2> + <letter 1>
[Example:
Column name “A” corresponds to the column number 1: 676*0 + 26*0 + 1 = 1.
Column name “AD” corresponds to the column number 30: 676*0 + 26*1 + 4 = 30.
Column name “XFD” corresponds to the column number 16384: 676*24 + 26*6 + 4 = 16384.
End example]
The first column in a sheet is number 1 and it has the name “A”. The last column in the sheet is number 16384 and it has the name “XFD”.
[Example:
A1 – a reference to the cell at column 1, row 1.
XFD1048576 – a reference to the cell in the bottom right corner of the sheet, that is, at column 16384, row 1048576.
End example]