by [Pieter] (1 Submission)
Category: Microsoft Office Apps/VBA
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
Returns the name of the column, given a number.
Eg. 5 -> 'E', 50 -> 'AX'. One line of code!
Inputs
Number of the column
Code Returns
Name of the column
Function ReturnName(ByVal num As Integer) As String
ReturnName = Split(Cells(, num).Address, "$")(1)
End Function