Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Turning rows of equal number of columns into 1 continuous row
I've got a worksheet with about 50+ rows of 5-column's worth of numbers
(a 5x50 grid). I'm trying to turn this into 1 continuous row that uses data from A1, B1, C1, D1, E1, A2, B2, C2, D2, E2, A3, B3... Befo A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 After: A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 Is there any way to automate some of this? Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Turning rows of equal number of columns into 1 continuous row
What do you mean, "some of this" ??? Try this.
Public Sub oneLoveUmmmRow() Dim wsF As Worksheet, wsT As Worksheet Dim rF As Range, rT As Range ' initialize Set wsF = ActiveSheet Set wsT = Sheets.Add wsT.Name = "Results" Set rF = wsF.Range("A1") Set rT = wsT.Range("A1") ' rf loops through all the values in wf ' rt just moves across the sheet popping values until rf is done Do While Not rF.Value = "" Do While Not rF.Value = "" rT.Value = rF.Value Set rT = rT.Offset(0, 1) Set rF = rF.Offset(0, 1) ' move rf one space right Loop Set rF = wsF.Range("A" & rF.Row + 1) ' move rf to the start of the next row Loop ' clean up Set rF = Nothing Set rT = Nothing Set wsF = Nothing Set wsT = Nothing End Sub chimerical wrote: I've got a worksheet with about 50+ rows of 5-column's worth of numbers (a 5x50 grid). I'm trying to turn this into 1 continuous row that uses data from A1, B1, C1, D1, E1, A2, B2, C2, D2, E2, A3, B3... Befo A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 After: A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 Is there any way to automate some of this? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cutting and pasting from rows into columns and visa versa. | New Users to Excel | |||
find number in multiple columns and rows | Excel Worksheet Functions | |||
turning rows into columns? | Excel Discussion (Misc queries) | |||
NUMBER OF ROWS IN A DYNAMIC RANGE | Excel Worksheet Functions | |||
How do I change the number of columns and rows in a worksheet | Excel Discussion (Misc queries) |