vba refer to column by number code example
Example 1: excel vba get column number from column name
'For column IV...
ColNum = Columns("IV").Column
Example 2: excel vba Column Name to Column Number
' Column name to column number
ColName = "A"
Debug.Print Range(ColName & 1).Column ' 1
' Column number to column name
ColNb = 1
Debug.Print Split(Cells(, ColNb).Address, "$")(1)