Duplicating rows help needed

A

ArthurN

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
 
M

Max

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
 
D

Don Guillett

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
 
K

Ken Wright

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

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------­------------------------------­----------------
It's easier to beg forgiveness than ask permission :)
------------------------------­------------------------------­----------------
 

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