Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to figure out how to automatically repeat the entire contents of
a row a specified number of times instead of having to cut and paste. Does anyone have any suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you inserting the copied row a "Specified number" of times, or adding
them to the end? Is the "Specified number", inputted by the user or is is a constant number of rows? Alan "phale" wrote: I am trying to figure out how to automatically repeat the entire contents of a row a specified number of times instead of having to cut and paste. Does anyone have any suggestions? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not adding --as in calculating a value at the end---just repeating the rows a
certain number of times (this number will vary from workorder to workorder so this number will be inputted by the user and we will need to be able to change that value each time). "Alan" wrote: Are you inserting the copied row a "Specified number" of times, or adding them to the end? Is the "Specified number", inputted by the user or is is a constant number of rows? Alan "phale" wrote: I am trying to figure out how to automatically repeat the entire contents of a row a specified number of times instead of having to cut and paste. Does anyone have any suggestions? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I meant "adding" the copied rows at the end of your data or are inserting
them at the selected or active cell location? "phale" wrote: Not adding --as in calculating a value at the end---just repeating the rows a certain number of times (this number will vary from workorder to workorder so this number will be inputted by the user and we will need to be able to change that value each time). "Alan" wrote: Are you inserting the copied row a "Specified number" of times, or adding them to the end? Is the "Specified number", inputted by the user or is is a constant number of rows? Alan "phale" wrote: I am trying to figure out how to automatically repeat the entire contents of a row a specified number of times instead of having to cut and paste. Does anyone have any suggestions? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I "think" the answer to your question is adding them at the selected or
active cell location. These are for what we call "op" sheets in which we have a specified number of beams that need cutting, pairing or some other operation done to them. So, if we need 150 cut to a certain length, we would want to have 150 rows. Then we might want to turn around--after the beams have been cut--and have them paired--in which case we would have a different description repated 75 times since it takes 2 singles to make 75 pairs. The only other information that are in these op sheets are at the beginning which tells the job number, customer, date, etc. I'm really ulitimately going to try to put together a form this information is inputted into. But right now I am just trying to figure out how to get the rows to repeat. "Alan" wrote: I meant "adding" the copied rows at the end of your data or are inserting them at the selected or active cell location? "phale" wrote: Not adding --as in calculating a value at the end---just repeating the rows a certain number of times (this number will vary from workorder to workorder so this number will be inputted by the user and we will need to be able to change that value each time). "Alan" wrote: Are you inserting the copied row a "Specified number" of times, or adding them to the end? Is the "Specified number", inputted by the user or is is a constant number of rows? Alan "phale" wrote: I am trying to figure out how to automatically repeat the entire contents of a row a specified number of times instead of having to cut and paste. Does anyone have any suggestions? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There's probably a simpler way codewise but this will work:
Sub CopyAndInsertRows() ' Application.ScreenUpdating = False Dim iCount As Integer iCount = InputBox("How many rows to insert?") Do Selection.EntireRow.Copy Selection.Insert Shift:=xlDown iCount = iCount - 1 Loop Until iCount = 0 Application.ScreenUpdating = True ' End Sub Alan "phale" wrote: I "think" the answer to your question is adding them at the selected or active cell location. These are for what we call "op" sheets in which we have a specified number of beams that need cutting, pairing or some other operation done to them. So, if we need 150 cut to a certain length, we would want to have 150 rows. Then we might want to turn around--after the beams have been cut--and have them paired--in which case we would have a different description repated 75 times since it takes 2 singles to make 75 pairs. The only other information that are in these op sheets are at the beginning which tells the job number, customer, date, etc. I'm really ulitimately going to try to put together a form this information is inputted into. But right now I am just trying to figure out how to get the rows to repeat. "Alan" wrote: I meant "adding" the copied rows at the end of your data or are inserting them at the selected or active cell location? "phale" wrote: Not adding --as in calculating a value at the end---just repeating the rows a certain number of times (this number will vary from workorder to workorder so this number will be inputted by the user and we will need to be able to change that value each time). "Alan" wrote: Are you inserting the copied row a "Specified number" of times, or adding them to the end? Is the "Specified number", inputted by the user or is is a constant number of rows? Alan "phale" wrote: I am trying to figure out how to automatically repeat the entire contents of a row a specified number of times instead of having to cut and paste. Does anyone have any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to XML Map Repeating Rows? | Excel Discussion (Misc queries) | |||
Repeating Rows at top | Excel Worksheet Functions | |||
Repeating rows in Excel | Excel Discussion (Misc queries) | |||
Repeating Rows | Excel Discussion (Misc queries) | |||
Repeating Rows | Excel Worksheet Functions |