Macro help

C

Confusicous

Sub Macro1()
'
' Macro1 Macro
'

'
Range("P4:Q7").Select
Selection.Cut
Range("A14").Select
ActiveSheet.Paste
Range("R4:S7").Select
Selection.Cut
Range("A18").Select
ActiveSheet.Paste
End Sub

Here is a macro I am working on and I need it to continue for 98 more times
but I can't figure out the loop. Any help is appreciated. Thanks
 
J

Jacob Skaria

Try the below..

Sub Macro1()
Dim lngCol As Long, lngRow As Long, intTemp As Integer
lngCol = 14
lngRow = 10
For intTemp = 1 To 80
lngCol = lngCol + 2
lngRow = lngRow + 4
Range(Cells(4, lngCol), Cells(7, lngCol + 1)).Cut Range("A" & lngRow)
Next

End Sub

If this post helps click Yes
 
B

Bob Umlas

Try this:
Sub Macro1()
N=14
For i=16 to 116 step 2
Cells(4,i).resize(4,2).cut cells(N,1)
N=N+4
Next
End Sub

HTH
Bob Umlas
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top