#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to auto-insert a row? Shawn Excel Worksheet Functions 4 December 3rd 08 07:04 PM
Need VBA script to auto-insert value upon row insert Phil Excel Worksheet Functions 4 May 6th 08 02:41 PM
Can I auto insert a worksheet when I insert a value in a cell. iainc Excel Worksheet Functions 0 April 27th 06 08:37 AM
Auto Insert/Auto Formula? Abacus Excel Worksheet Functions 1 February 3rd 06 11:33 AM
Insert cell/format/text/fontsize and auto insert into header? Unfurltheflag Excel Programming 2 November 3rd 04 05:39 PM


All times are GMT +1. The time now is 08:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"