+ Reply to Thread
Results 1 to 3 of 3

Insert multiple rows in specific sections of sheet?

  1. #1
    Registered User
    Join Date
    10-30-2007
    Posts
    1

    Insert multiple rows in specific sections of sheet?

    Hello,

    I'm very new to VBA, so this may be a pretty easy question...

    I need to write a macro that can insert a row, and copy down all formulas from the above row, between a specific range of rows. I'm attempting to do this in multiple ranges of rows on the sheet- This is for an estimating sheet that has 50 sections. The idea is to allow other users (not very skilled with Excel) to easily insert rows and be sure that the formulas are being copied down.

    I recorded a macro that seemed to work, but if too many rows are inserted in a given section, in the subsequent sections, the row recorded to be inserted can get shifted out of that particular section...

    Let me know if this is confusing- I'll try to clarify!

    Thanks...

  2. #2
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686
    perhaps you need to post your code

    it could be an absolute/relative reference problem

    does it do the first insertion correctly and then subsequent ones incorrectly?

    your macro could search for the section heading and inserts a new row directly below it, thus keeping the newest data at the top of the list. (or put it at the end of the section)

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This link may be of interest

    http://www.mvps.org/dmcritchie/excel...w.htm#insrtrow

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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