Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Column label based on column index

Is there a way to get a column label (A, B, ...AA, AB ) based on column
number. Lets say i have a column number 27 thus i want to see AA.

thanks
Ig


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Column label based on column index

=LEFT(ADDRESS(1,A1,4),LEN(ADDRESS(1,A1,4))-1)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"igorek" wrote in message ...
| Is there a way to get a column label (A, B, ...AA, AB ) based on column
| number. Lets say i have a column number 27 thus i want to see AA.
|
| thanks
| Ig
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Column label based on column index

On Dec 14, 10:51 am, igorek wrote:
Is there a way to get a column label (A, B, ...AA, AB ) based on column
number. Lets say i have a column number 27 thus i want to see AA.

thanks
Ig


Hello lg,

Here is function that takes the column letter and returns the column
number.

Function ColNumber(Column_Letter As String) As Long

ColNumber = ActiveSheet.Cells(1, Column_Letter).Column

End Function


Example:
N = ColNumber("AA")

Sincerely,
Leith Ross
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Naming cells in a table based on column and row label [email protected] Excel Discussion (Misc queries) 3 December 3rd 06 11:16 AM
lookup column label based on data in cell Aaron Excel Worksheet Functions 1 August 22nd 06 04:13 PM
Select a column based on a index VH Excel Programming 5 March 6th 06 09:40 AM
chart label reference based on the column number z.entropic Charts and Charting in Excel 2 May 21st 05 05:54 PM
chart label reference based on the column number bj Charts and Charting in Excel 0 May 20th 05 07:18 PM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"