Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
convert numbers to alpha code | Excel Discussion (Misc queries) | |||
Can you convert Excel column indicators from Alpha to Numberic? | Excel Discussion (Misc queries) | |||
Can you convert Excel column indicators from Alpha to Numberic? | Excel Discussion (Misc queries) | |||
Convert Alpha to Numeric | Excel Discussion (Misc queries) | |||
convert cells containing alpha to numeric | Excel Worksheet Functions |