=COLUMN(A1)
The COLUMN function returns the column number of the given cell reference.
=COLUMN(D10) returns 4 because column D is the fourth column.
Sub acitveCellInfo()
MsgBox "Active-column: " & ActiveCell.Column & ", Active-Row: " & ActiveCell.Row, vbInformation, "Active Cell"
End Sub
'if you want to see the column Nr's during working in Excel table you can change the reference-style
Sub changeReferenceStyle()
Application.ReferenceStyle = xlA1 + xlR1C1 - Application.ReferenceStyle
End Sub