Get columns as "A, B, C etc"

  • Thread starter Thread starter Niklas
  • Start date Start date
N

Niklas

Hi
If I use Range.Column I get numbers, but how do I do if I
want to get the letters?
Regards
/Niklas
 
Niklas,

You can use a function like the following:

Function ColLetter(Rng As Range) As String
ColLetter = Left(Rng.Address(False, False), 1 - (Rng.Column >
26))
End Function


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Hello Niklas,

Please see the following Microsoft Knowledge base articles:

198112 HOWTO: Convert Indices (row,col) into Excel-Style A1:C1 Strings
http://support.microsoft.com/?id=198112

198144 INFO: Convert (row,col) Indices into Excel-Style A1:C1 Strings
http://support.microsoft.com/?id=198144


--------------------
From: "Niklas" <[email protected]>
Subject: Get columns as "A, B, C etc"
Date: Thu, 7 Aug 2003 08:05:52 -0700
If I use Range.Column I get numbers, but how do I do if I
want to get the letters?
Regards
/Niklas

Regards,
Chris Jensen[MSFT]

This posting is provided “AS IS” with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
<http://www.microsoft.com/security>.
 
Back
Top