Function Reference


_Excel_ColumnToNumber

Converts the column letter(s) to a number

#include <Excel.au3>
_Excel_ColumnToNumber ( $sColumn )

Parameters

$sColumn The column letter(s) which you want to turn into a number (e.g. "ZZ" to 702)

Return Value

Success: the column number.
Failure: 0 and sets @error.
@error: 1 - $sColumn is not a valid string

Related

_Excel_ColumnToLetter

Example

#include <Excel.au3>
#include <MsgBoxConstants.au3>

; ****************************************************************************
; Translate a column number to the Excel colunm letter
; ****************************************************************************
Local $iCol = 676
Local $sLetter = _Excel_ColumnToLetter($iCol)
If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_ColumnToLetter Example 1", "Error converting number to letter." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_ColumnToLetter Example 1", "Number: " & $iCol & " = Letter: " & $sLetter)