Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Column letter to index

How do I convert column letters to column index? I have a VBA routine that
reads cells that contains destination cells. For instance, cell C2 may have
the letter D, which indicats that column D is where the output should go.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default Column letter to index

In options you can set R1C1 reference style where the columns are numbered
instead of having alpha characters.

However, I am not certain that is what you are referring to because I am a
bit confused by your description of the problem. Could you post some of the
code so that we can see exactly what you are referring to.
--
Regards,

OssieMac


"Radon" wrote:

How do I convert column letters to column index? I have a VBA routine that
reads cells that contains destination cells. For instance, cell C2 may have
the letter D, which indicats that column D is where the output should go.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Column letter to index

Maybe...
'--
Sub MakeItNumeric()
Dim N As Long
N = Columns(Range("C2").Value).Column
MsgBox N
End Sub
--
Jim Cone
Portland, Oregon USA


"Radon"
wrote in message
How do I convert column letters to column index? I have a VBA routine that
reads cells that contains destination cells. For instance, cell C2 may have
the letter D, which indicats that column D is where the output should go.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Column letter to index

Hi,

In VBA code this will put Stuff cell D1 if the letter D is in C2 of the
active sheet.

Sub test()
Range([C2] & "1") = "Stuff"

End Sub
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Radon" wrote:

How do I convert column letters to column index? I have a VBA routine that
reads cells that contains destination cells. For instance, cell C2 may have
the letter D, which indicats that column D is where the output should go.

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
How do I turn excel columns from column number to column letter? column Setting up and Configuration of Excel 1 April 29th 08 10:15 AM
Translate Column Index Num to Letter DJS Excel Discussion (Misc queries) 8 December 8th 06 05:01 PM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Links and Linking in Excel 6 October 13th 05 09:09 AM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Excel Worksheet Functions 6 October 13th 05 09:09 AM
column header changed from letter to number, how return to letter Ron Excel Discussion (Misc queries) 2 May 9th 05 08:34 PM


All times are GMT +1. The time now is 06:36 AM.

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"