ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   auto insert (https://www.excelbanter.com/excel-programming/354693-auto-insert.html)

ME @ Home

auto insert
 
hiya,,, i have the following line of code ...

Sub insertrow()
Dim sheet As Worksheet
Application.ScreenUpdating = False

Row = InputBox("Please Enter The Line Number Where You Want To Enter New
line")

For Each sheet In Worksheets(Array("Jan", "Feb", "March", "april", "may",
"June", "July", "Aug", "Sep", "Oct", "Nov", "Dec", "Overview"))
sheet.Rows(Row).Insert

Next sheet

End Sub

..... i am trying to get each page to either auto insert a formula into cells
b , c . d . e of which ever row number is selected or copy and paste the
formulas from the same 4 cells in the live above (which are already in place)
any ideas how to do either

Bob Phillips[_6_]

auto insert
 
Here is an example

Worksheets(Array("Jan", "Feb", "March", "April", _
"May", "June", "July", "Aug", _
"Sep", "Oct", "Nov", "Dec", "Overview")).Select
Sheets("Jan").Activate
Rows(10).Insert
Range("B10").FormulaR1C1 = "=R[-9]C[-1]"
Range("C10").FormulaR1C1 = "=R[-9]C[-1]+1"
Range("D10").FormulaR1C1 = "=R[89]C[-1]*2"
Range("E10").FormulaR1C1 = "=SUM(RC[-3]:RC[-1])"


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ME @ Home" wrote in message
...
hiya,,, i have the following line of code ...

Sub insertrow()
Dim sheet As Worksheet
Application.ScreenUpdating = False

Row = InputBox("Please Enter The Line Number Where You Want To Enter New
line")

For Each sheet In Worksheets(Array("Jan", "Feb", "March", "april", "may",
"June", "July", "Aug", "Sep", "Oct", "Nov", "Dec", "Overview"))
sheet.Rows(Row).Insert

Next sheet

End Sub

.... i am trying to get each page to either auto insert a formula into

cells
b , c . d . e of which ever row number is selected or copy and paste the
formulas from the same 4 cells in the live above (which are already in

place)
any ideas how to do either




ME @ Home

auto insert
 
ta very much

"Bob Phillips" wrote:

Here is an example

Worksheets(Array("Jan", "Feb", "March", "April", _
"May", "June", "July", "Aug", _
"Sep", "Oct", "Nov", "Dec", "Overview")).Select
Sheets("Jan").Activate
Rows(10).Insert
Range("B10").FormulaR1C1 = "=R[-9]C[-1]"
Range("C10").FormulaR1C1 = "=R[-9]C[-1]+1"
Range("D10").FormulaR1C1 = "=R[89]C[-1]*2"
Range("E10").FormulaR1C1 = "=SUM(RC[-3]:RC[-1])"


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ME @ Home" wrote in message
...
hiya,,, i have the following line of code ...

Sub insertrow()
Dim sheet As Worksheet
Application.ScreenUpdating = False

Row = InputBox("Please Enter The Line Number Where You Want To Enter New
line")

For Each sheet In Worksheets(Array("Jan", "Feb", "March", "april", "may",
"June", "July", "Aug", "Sep", "Oct", "Nov", "Dec", "Overview"))
sheet.Rows(Row).Insert

Next sheet

End Sub

.... i am trying to get each page to either auto insert a formula into

cells
b , c . d . e of which ever row number is selected or copy and paste the
formulas from the same 4 cells in the live above (which are already in

place)
any ideas how to do either






All times are GMT +1. The time now is 12:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com