+ Reply to Thread
Results 1 to 3 of 3

auto insert

  1. #1
    ME @ Home
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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" <r.mcc@ntlworld.com> wrote in message
    news:B062183E-7D60-409F-81A6-025D708B604A@microsoft.com...
    > 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. #3
    ME @ Home
    Guest

    Re: 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" <r.mcc@ntlworld.com> wrote in message
    > news:B062183E-7D60-409F-81A6-025D708B604A@microsoft.com...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1