Hi,
I've got a huge list that looks like this:
-------------------------------
name data 1 data 2 data 3
-------------------------------
book1 2 3 4
book2 4 5 7
book3 5 6 5
I need to duplicate every row (except the heading):
book1 2 3 4
book1 2 3 4
book2 4 5 7
book2 4 5 7
Is there a way to automate this routine? You'd save my life...
Thanx in advance
Max - 28 Oct 2007 13:23 GMT
Assuming source data in Sheet1, cols A to D, from row2 down
In Sheet2,
Put in A2:
=OFFSET(Sheet1!$A$2,INT((ROWS($1:1)-1)/2),COLUMNS($A:A)-1)
Copy A2 across to D2, fill down as far as required

Signature
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> Hi,
> I've got a huge list that looks like this:
[quoted text clipped - 13 lines]
> Is there a way to automate this routine? You'd save my life...
> Thanx in advance
Don Guillett - 28 Oct 2007 15:20 GMT
This should do it
Sub dupallrows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
Rows(i).Copy
Rows(i).Insert shift:=xlDown
Next i
End Sub

Signature
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
> Hi,
> I've got a huge list that looks like this:
[quoted text clipped - 13 lines]
> Is there a way to automate this routine? You'd save my life...
> Thanx in advance
Ken Wright - 28 Oct 2007 22:41 GMT
Insert a helper column at the front and then just number every row starting
at your first row of data. Just put in 1,2,3 and then select them and
double clikc the bottom right of the selection to automatically number
downwards.
Now just copy the entire set of data and paste it underneath the original.
Then just sort on the row numbering you added, and finally delete the
additional helper column.
Should be 60 seconds max

Signature
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------
> Hi,
> I've got a huge list that looks like this:
[quoted text clipped - 13 lines]
> Is there a way to automate this routine? You'd save my life...
> Thanx in advance