+ Reply to Thread
Results 1 to 3 of 3

adding rows to spreadsheet after macro is written

Hybrid View

  1. #1
    iamn94
    Guest

    adding rows to spreadsheet after macro is written

    I need to add some rows and / or columns to a spreadsheet. After I add the
    columns / rows, the macros that I built blow up. I have tried adding $ signs
    to the cell references, ie: Range("D56") becomes Range ("$D$56), but this
    does not seem to work. In excel the formulas scale to reflect any row/col
    additions or deletions.

    Any thoughts on what I should do to the macro language to ensure that the
    macro changes and the layout of the sheet changes?

    Thanks
    --
    sd

  2. #2
    Vasant Nanavati
    Guest

    Re: adding rows to spreadsheet after macro is written

    I find that the best solution is to name the ranges that you want to use in
    your macros. Then use the range names instead of the cell references.

    --

    Vasant



    "iamn94" <[email protected]> wrote in message
    news:[email protected]...
    > I need to add some rows and / or columns to a spreadsheet. After I add

    the
    > columns / rows, the macros that I built blow up. I have tried adding $

    signs
    > to the cell references, ie: Range("D56") becomes Range ("$D$56), but this
    > does not seem to work. In excel the formulas scale to reflect any row/col
    > additions or deletions.
    >
    > Any thoughts on what I should do to the macro language to ensure that the
    > macro changes and the layout of the sheet changes?
    >
    > Thanks
    > --
    > sd




  3. #3
    Don Guillett
    Guest

    Re: adding rows to spreadsheet after macro is written

    best to use a defined range name that will auto adjust
    insert>name>define>name it mysumrange
    in the refers to box
    =offset($a$2,0,0,counta($a:$a,1)
    look n help for offset. adjust to your needs

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "iamn94" <[email protected]> wrote in message
    news:[email protected]...
    > I need to add some rows and / or columns to a spreadsheet. After I add

    the
    > columns / rows, the macros that I built blow up. I have tried adding $

    signs
    > to the cell references, ie: Range("D56") becomes Range ("$D$56), but this
    > does not seem to work. In excel the formulas scale to reflect any row/col
    > additions or deletions.
    >
    > Any thoughts on what I should do to the macro language to ensure that the
    > macro changes and the layout of the sheet changes?
    >
    > Thanks
    > --
    > sd




+ 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