kathyb0527
11-09-2009, 01:35 PM
I have a large amount of data (>5000 rows) that I need to copy and paste into word (as a picture). In order to do this, I need to break up the data into manageable tables (~32 rows) that will fit on a page. I've tried variations on the code below, but I get too many Title rows and I end up with too many tables in my document.
Sub Insert_Row()
Dim a As Byte
Dim c As Integer
Range("A1").Select
a = 30
c = 0
While ActiveCell.Value <> ""
c = c + 32
Rows("1:1").Copy
ActiveSheet.Rows(c).Insert Shift:=xlDown
ActiveSheet.Rows(c).Insert Shift:=xlDown
ActiveCell.Offset(a, 0).Select
Wend
End Sub
If anyone can alter this code or shove me in the right direction I'd appreciate it.
Thanks!
Sub Insert_Row()
Dim a As Byte
Dim c As Integer
Range("A1").Select
a = 30
c = 0
While ActiveCell.Value <> ""
c = c + 32
Rows("1:1").Copy
ActiveSheet.Rows(c).Insert Shift:=xlDown
ActiveSheet.Rows(c).Insert Shift:=xlDown
ActiveCell.Offset(a, 0).Select
Wend
End Sub
If anyone can alter this code or shove me in the right direction I'd appreciate it.
Thanks!