excel vba Column Name from Column Number

The solution for “excel vba Column Name from Column Number” can be found here. The following code will assist you in solving the problem.

‘ 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)

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts