Thread: auto insert
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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