Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Duplicating rows help needed

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Duplicating rows help needed

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
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ArthurN" wrote:
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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Duplicating rows help needed

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


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ArthurN" wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default Duplicating rows help needed

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 :-)
------------------------------*------------------------------*----------------


"ArthurN" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro needed for inserting blank rows sunslight Excel Worksheet Functions 2 January 12th 07 05:58 PM
Duplicating Rows Based on Cell Value [email protected] Excel Discussion (Misc queries) 6 September 19th 06 11:35 PM
How do I prevent rows from duplicating when sending a worksheet? CIA @ honeywell Excel Worksheet Functions 0 September 14th 06 02:40 AM
Adding and Deleting rows - update formulas help needed. bperks Excel Worksheet Functions 1 May 31st 06 08:30 PM
Formula for Duplicating Rows!! GOL Excel Discussion (Misc queries) 2 May 22nd 06 08:54 PM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"