Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop for myRng for next set of 9 rows
Column A has a LONG (2000- 4000 + rows) in set of 9 row "clumps" of data.
11 to 19 21 to 29 31 to 39 etc etc How do I set myRng to each 9 row clump to be transposed to D2 to L2 and on down, (which works fine using the last line of code.) Thanks, Howard Sub MyArryCellsXpose() Dim myRng As Range Dim rngC As Range Dim i As Long Dim myArr() As Variant Set myRng = Range("A1:A9") For Each rngC In myRng ReDim Preserve myArr(myRng.Cells.Count - 1) myArr(i) = rngC i = i + 1 Next Sheets("Sheet1").Range("D" & Rows.Count).End(xlUp)(2).Resize(columnsize:=myRng. Cells.Count) = myArr End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop every 26 rows and if.. | Excel Programming | |||
Help With a Loop That Deletes Rows | Excel Programming | |||
loop to insert rows | Excel Programming | |||
Cannot loop through rows in C# | Excel Programming | |||
range("myrng"), names("myrng").RefersToRange?? | Excel Programming |