Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default how to duplicate rows?

I would like to know how I can duplicate rows.
Lets say I have a thousand names in column A IE: Bert, Ernie, Bob, John,
Fred... and so on. I need to have Bert, Bert, Bert, Ernie, Ernie, Ernie, Bob,
Bob, Bob, John, John, John, Fred, Fred, Fred, Fred... although I need then 5
or 6 times repeated not just 3!
--
Marilyn - novice excel user.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default how to duplicate rows?

Yes I need to repeat them. But keep them in the same order as they are now If
Bert came first, then Ernie€¦ I still need Bert first, (repeated 3 times) and
then Ernie (3 times) and so on.
--
Marilyn - novice excel user.


"Don Guillett" wrote:

repeated ??

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marilyn" wrote in message
...
I would like to know how I can duplicate rows.
Lets say I have a thousand names in column A IE: Bert, Ernie, Bob, John,
Fred... and so on. I need to have Bert, Bert, Bert, Ernie, Ernie, Ernie,
Bob,
Bob, Bob, John, John, John, Fred, Fred, Fred, Fred... although I need then
5
or 6 times repeated not just 3!
--
Marilyn - novice excel user.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default how to duplicate rows?

I really do not know how to explain this any easier that I did in my initial
question, Perhaps there may be someone else who can answer this question, I
have asked around within my own office and no one know how and no one knows
how I could explain it any other way that would be simpler. Thanks the
responses that you tried to assist me with.
--
Marilyn - novice excel user.


"Don Guillett" wrote:

Either I need to learn how to guess better or you need to learn how to
explain better...
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marilyn" wrote in message
...
Yes I need to repeat them. But keep them in the same order as they are now
If
Bert came first, then Ernie€¦ I still need Bert first, (repeated 3 times)
and
then Ernie (3 times) and so on.
--
Marilyn - novice excel user.


"Don Guillett" wrote:

repeated ??

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marilyn" wrote in message
...
I would like to know how I can duplicate rows.
Lets say I have a thousand names in column A IE: Bert, Ernie, Bob,
John,
Fred... and so on. I need to have Bert, Bert, Bert, Ernie, Ernie,
Ernie,
Bob,
Bob, Bob, John, John, John, Fred, Fred, Fred, Fred... although I need
then
5
or 6 times repeated not just 3!
--
Marilyn - novice excel user.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default how to duplicate rows?

Perhaps you could give an example???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marilyn" wrote in message
...
I really do not know how to explain this any easier that I did in my
initial
question, Perhaps there may be someone else who can answer this question,
I
have asked around within my own office and no one know how and no one
knows
how I could explain it any other way that would be simpler. Thanks the
responses that you tried to assist me with.
--
Marilyn - novice excel user.


"Don Guillett" wrote:

Either I need to learn how to guess better or you need to learn how to
explain better...
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marilyn" wrote in message
...
Yes I need to repeat them. But keep them in the same order as they are
now
If
Bert came first, then Ernie€¦ I still need Bert first, (repeated 3
times)
and
then Ernie (3 times) and so on.
--
Marilyn - novice excel user.


"Don Guillett" wrote:

repeated ??

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marilyn" wrote in message
...
I would like to know how I can duplicate rows.
Lets say I have a thousand names in column A IE: Bert, Ernie, Bob,
John,
Fred... and so on. I need to have Bert, Bert, Bert, Ernie, Ernie,
Ernie,
Bob,
Bob, Bob, John, John, John, Fred, Fred, Fred, Fred... although I
need
then
5
or 6 times repeated not just 3!
--
Marilyn - novice excel user.





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how to duplicate rows?

Sub Add2Rows()
'insert 2 rows and fill down from above
Dim LastRow As Long, I As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
For I = LastRow To 1 Step -1
Rows(I + 1).Resize(2).Insert
Rows(I).Resize(3).FillDown
Next I
End Sub

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Thu, 5 Jun 2008 07:42:01 -0700, Marilyn
wrote:

I really do not know how to explain this any easier that I did in my initial
question, Perhaps there may be someone else who can answer this question, I
have asked around within my own office and no one know how and no one knows
how I could explain it any other way that would be simpler. Thanks the
responses that you tried to assist me with.
--
Marilyn - novice excel user.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default how to duplicate rows?

Thank you Gord - I appreciate the Advice and the links. You've been a great
help to me.
--
Marilyn - novice excel user.


"Gord Dibben" wrote:

Sub Add2Rows()
'insert 2 rows and fill down from above
Dim LastRow As Long, I As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
For I = LastRow To 1 Step -1
Rows(I + 1).Resize(2).Insert
Rows(I).Resize(3).FillDown
Next I
End Sub

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Thu, 5 Jun 2008 07:42:01 -0700, Marilyn
wrote:

I really do not know how to explain this any easier that I did in my initial
question, Perhaps there may be someone else who can answer this question, I
have asked around within my own office and no one know how and no one knows
how I could explain it any other way that would be simpler. Thanks the
responses that you tried to assist me with.
--
Marilyn - novice excel user.



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
duplicate rows robert morris Excel Discussion (Misc queries) 3 April 11th 08 04:16 PM
Duplicate rows into new rows based on row value Tom Excel Worksheet Functions 5 March 29th 08 05:32 PM
Duplicate rows, put in another value Carol G. Excel Worksheet Functions 1 March 19th 08 10:59 AM
duplicate rows Windy Excel Discussion (Misc queries) 2 February 20th 08 10:43 PM
Duplicate rows [email protected] Excel Worksheet Functions 5 December 1st 05 03:28 PM


All times are GMT +1. The time now is 05:07 PM.

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

About Us

"It's about Microsoft Excel"