Search Tools Links Login

Column Name Excel


Visual Basic 6, or VB Classic

Returns the name of the column, given a number.
Eg. 5 -> 'E', 50 -> 'AX'. One line of code!

Original Author: [Pieter]

Inputs

Number of the column

Returns

Name of the column

Code

Function ReturnName(ByVal num As Integer) As String
ReturnName = Split(Cells(, num).Address, "$")(1)
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 99 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.