LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default 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
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
Loop every 26 rows and if.. Robert Excel Programming 4 March 30th 06 10:52 AM
Help With a Loop That Deletes Rows Vecchia Excel Programming 5 November 21st 05 10:04 PM
loop to insert rows Fergie Excel Programming 1 November 18th 04 03:48 AM
Cannot loop through rows in C# Howard Excel Programming 2 February 5th 04 03:39 PM
range("myrng"), names("myrng").RefersToRange?? active_x[_8_] Excel Programming 2 November 8th 03 01:39 PM


All times are GMT +1. The time now is 10:33 PM.

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

About Us

"It's about Microsoft Excel"