I've got a simple macro that makes copies of the original table 10 rows below the last table. Once it has copied the table it takes a same sized formula table and copies it next to the new table. Or so it should but the macro stops running right after copying the first table and I can't figure out why.
Here's my code:
I'm using Excel 2003 and so far there's only two tables on the page so there should be plenty of rows left to pile up the tables.
Here's my code:
Code:
Sub CopyTable()
Dim Rng As Range
Dim c As Range
With Sheet1
'Original table:
Set Rng = .Range("A68:AC126")
'Destination= 10 rows below the last table
Set c = .Cells(.Rows.Count, 1).End(xlUp).Offset(10)
'Copies the original table:
With Rng
.Copy Destination:=c '.Resize(.Rows.Count, .Columns.Count)
End With
'Copies the formula table:
With Rng.Offset(0, 35)
.Copy Destination:=c.Offset(0, 35)
End With
End With
End Sub