Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text To Columns Looping Macro
I am using Excel 2003
I have the following code that loops through data in Cell A1 Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _ FieldInfo:=Array(Array(0, 1), Array(9, 1), Array(12, 1), Array(22, 1), Array(25, 1)), _ TrailingMinusNumbers:=True Selection.Cut Range("A4").Select ActiveSheet.Paste Range("C1").Select Selection.Cut Range("A5").Select ActiveSheet.Paste Range("E1").Select Selection.Cut Range("A6").Select From above the code goes through each array and parses it out in this case to Cell E1. I would like to know how I can use a loop to do the above sequence. 9 values then 3 then 9 values then 3 etc.... The second part is copying and pasting every other cell from the above loop Which is copy Cell A1 paste to A4 then copy C1 and paste to A5 etc... until the data ends. So is I would guess it would be a loop within a loop but am unsure how to code this. Thanks D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping through columns | Excel Programming | |||
Looping macro needed to find intersections of rows and columns | Excel Programming | |||
Looping thru columns | Excel Programming | |||
Macro for Text to Columns - convert to text or general | Excel Programming | |||
Looping through columns | Excel Programming |