Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to duplicate rows?
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
duplicate rows | Excel Discussion (Misc queries) | |||
Duplicate rows into new rows based on row value | Excel Worksheet Functions | |||
Duplicate rows, put in another value | Excel Worksheet Functions | |||
duplicate rows | Excel Discussion (Misc queries) | |||
Duplicate rows | Excel Worksheet Functions |