Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there any way to auto-insert a row? | Excel Worksheet Functions | |||
Need VBA script to auto-insert value upon row insert | Excel Worksheet Functions | |||
Can I auto insert a worksheet when I insert a value in a cell. | Excel Worksheet Functions | |||
Auto Insert/Auto Formula? | Excel Worksheet Functions | |||
Insert cell/format/text/fontsize and auto insert into header? | Excel Programming |