This works well in VBA using double substitution, where R is the range of Excel single cells:
ColumnLetter = Replace(Replace(R.AddressLocal(ReferenceStyle:=1), "$", vbNullString), R.Row, vbNullString) It is based on an equivalent idea for use on a worksheet. In the cell formula, this is even shorter:
=SUBSTITUTE(ADDRESS(1,COLUMN(M1),4),1,"")
This returns the letter M and works right up to the XFD column. The reference to cell M1 can be any range anywhere. The top left column is returned for ranges or more than one cell.
It gets the ADDRESS of the first cell in the column, and then removes trailing-1, replacing NullString for it. (4 in ADDRESS makes sure that the address is returned as a relative address, i.e. One without and $ characters in it.)
Thanks to barry houdini who put me in search of a good answer to this question.
Neil dunlop
source share