Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a new item worksheet set up, for buyers to properly enter all of the
information needed to set up new sku's in our system. What I would like to do, is have them enter the number of new items they are setting up, and then have Excel copy all of the formulas in row 2 and paste them into the exact number of rows equal to the number of items they are setting up. Example: # of sku's being set up = 15 Copy row 2 and paste it into the 15 contiguous rows from 2 thru 14 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub AAA()
Dim num As Variant, rng As Range num = InputBox("enter number of new rows") If num = "" Then Exit Sub If Not IsNumeric(num) Then Exit Sub Set rng = Cells(Rows.Count, 1).End(xlUp)(2).EntireRow Set rng = rng.Resize(num) Rows(2).Copy rng End Sub -- Regards, Tom Ogilvy "jeffbert" wrote: I have a new item worksheet set up, for buyers to properly enter all of the information needed to set up new sku's in our system. What I would like to do, is have them enter the number of new items they are setting up, and then have Excel copy all of the formulas in row 2 and paste them into the exact number of rows equal to the number of items they are setting up. Example: # of sku's being set up = 15 Copy row 2 and paste it into the 15 contiguous rows from 2 thru 14 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works perfectly. Once again, thanks for your help. This is the third or
fourth time that you have come through for me. "Tom Ogilvy" wrote: Sub AAA() Dim num As Variant, rng As Range num = InputBox("enter number of new rows") If num = "" Then Exit Sub If Not IsNumeric(num) Then Exit Sub Set rng = Cells(Rows.Count, 1).End(xlUp)(2).EntireRow Set rng = rng.Resize(num) Rows(2).Copy rng End Sub -- Regards, Tom Ogilvy "jeffbert" wrote: I have a new item worksheet set up, for buyers to properly enter all of the information needed to set up new sku's in our system. What I would like to do, is have them enter the number of new items they are setting up, and then have Excel copy all of the formulas in row 2 and paste them into the exact number of rows equal to the number of items they are setting up. Example: # of sku's being set up = 15 Copy row 2 and paste it into the 15 contiguous rows from 2 thru 14 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sum Number of Rows based on Value in Another Cell | Excel Worksheet Functions | |||
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? | New Users to Excel | |||
Insert a number of rows based on a value in a cell on active row | Excel Programming | |||
Insert a number of rows based on a value in a cell on active row | Excel Discussion (Misc queries) | |||
Insert a number of rows based on a value in a cell on active row | Excel Worksheet Functions |