Thread: Syntax problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Syntax problem

Sub TransposeData3()
sr = 1
dr = 0
rw = Cells(Rows.Count, sr).End(xlUp)
For sr = 1 To rw + 9 Step 10
dr = dr + 1
Range(Cells(sr, 1), Cells(sr + 9, 1)).Select
Selection.Copy
Cells(dr, 2).Select
Selection.PasteSpecial _
Paste:=xlPasteAll, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=True
Next
End Sub

--
Regards,
Tom Ogilvy
"unknowndevice"
wrote in message
news:unknowndevice.1ue3md_1125090326.0714@excelfor um-nospam.com...

Can anyone debug this?

Sub TransposeData3()
sr = 1
dr = 0
For sr = 1 To 29 Step 10 ' Change 100 to suit number of rows in the
source
Column
dr = dr + 1
Range(Cells(sr, 1), Cells(sr + 9, 1)).Select ' Select A1:A19
first
loop, then A11:A20 next loop etc
Selection.Copy
Cells(dr, 2).Select ' Select B1 first loop, then B2 second loop
etc
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Next
End Sub


--
unknowndevice
------------------------------------------------------------------------
unknowndevice's Profile:

http://www.excelforum.com/member.php...o&userid=26646
View this thread: http://www.excelforum.com/showthread...hreadid=399610