Hi,
I have a function (see below) which converts a "number" to an alphacol ID.
For example: Number =1 then alphacol(1) = "A"
However, this function only works from 1 to 256................any idea on how to fix this or get a new function?
Function alphacol(numcol As Long)
If numcol > 0 And numcol < 257 Then
If numcol > 26 Then
colchar = Chr(64 + Int((numcol - 1) / 26))
colchar = colchar & Chr(65 + ((numcol - 1) Mod 26))
Else: colchar = Chr(65 + ((numcol - 1) Mod 26))
End If
End If
alphacol = colchar
End Function
Bookmarks