Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Column Designation Conversion - alpha/numerical

Is there a function that will directly "translate" between the letter
designators for Excel columns and the equivalent column numbers?

Cells(n,m) uses a number to designate the column.

I'm looking for a function, f(m), that returns the equivalent letter
designation for display in a TextBox. Also the function that will
take the letter(s) [text] entered into a text box and return the
column number for use in the Cells() formula. e.g. m = g("CB")

I could write the parser, but if there is a built-in function, I'd
rather use it.

Thanks,

Fred Holmes
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Column Designation Conversion - alpha/numerical

Fred,

Here is a simple UDF posted previously by Gord Dibben. Just pas sit the
column number

Function GetColLet(ColNumber As Integer) As String
GetColLet = Left(Cells(1, ColNumber).Address(False, False), _
1 - (ColNumber 26))
End Function


--

HTH

RP

"Fred Holmes" wrote in message
...
Is there a function that will directly "translate" between the letter
designators for Excel columns and the equivalent column numbers?

Cells(n,m) uses a number to designate the column.

I'm looking for a function, f(m), that returns the equivalent letter
designation for display in a TextBox. Also the function that will
take the letter(s) [text] entered into a text box and return the
column number for use in the Cells() formula. e.g. m = g("CB")

I could write the parser, but if there is a built-in function, I'd
rather use it.

Thanks,

Fred Holmes



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
ALPHA/NUMERICAL SORT MoKaLasco Excel Discussion (Misc queries) 5 July 4th 09 12:51 PM
Alpha & Numerical Help Needed talltom Excel Worksheet Functions 6 January 9th 07 07:20 PM
Alpha/Numerical numbers rhani111 Excel Worksheet Functions 8 July 28th 06 02:09 AM
Change the column designation from a numeric to an alpha George Sladky Excel Discussion (Misc queries) 2 May 4th 06 02:47 PM
alpha column changed to numerical column DianeMcP New Users to Excel 3 November 7th 05 07:01 PM


All times are GMT +1. The time now is 12:00 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"