LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Convert column value to alpha

I'm parsing through a Text file with excel and trying to minimize the
code. This is the code I've started with and would like to use a Do
While loop. I've defined my starting and ending points with the ActRow
and ActColumn statements. Unfortunately, the "ActiveCell.Column"
statement returns a numeric value (1 in this case) for Column "A".

How can I convert this to "A", then "B", then "C", etc until I reach
the "ActRow" value (in my case 30)?


Columns("A:B").Select
Columns("A:B").EntireColumn.AutoFit

Range("A1").Select
Selection.End(xlDown).Select
ActRow = ActiveCell.Row
Dim ActColumn
ActColumn = ActiveCell.Column

ActColumn2 = ActColumn + 2

Range(ActColumn & "1:" & ActColumn & ActRow).Select
Selection.Cut
Range(ActColumn2 & "1").Select
ActiveSheet.Paste

Do While Counter <= ActRow

Range(ActColumn2 & "2:" & ActColumn & ActRow).Select
Selection.Cut
Range(ActColumn3 & "1").Select
ActiveSheet.Paste
ActColumn2 = ActColumn2 + 1
ActColumn3 = ActColumn3 + 1
Counter = Counter + 1

Loop

--

 
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
convert numbers to alpha code chas Excel Discussion (Misc queries) 1 November 26th 06 12:33 AM
Can you convert Excel column indicators from Alpha to Numberic? JudyB Excel Discussion (Misc queries) 1 February 2nd 06 04:17 PM
Can you convert Excel column indicators from Alpha to Numberic? Gary''s Student Excel Discussion (Misc queries) 0 February 2nd 06 03:29 PM
Convert Alpha to Numeric Vicki Excel Discussion (Misc queries) 2 March 21st 05 12:01 PM
convert cells containing alpha to numeric ezu Excel Worksheet Functions 14 January 9th 05 10:01 PM


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

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

About Us

"It's about Microsoft Excel"