+ Reply to Thread
Results 1 to 4 of 4

Macro to insert lines and copy

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    300

    Macro to insert lines and copy

    Hi,

    Thank you so much in advance for your help.

    I have a macro that I want to add lines for me. I have attached a file that has a a coulmn called "Total". I want the macro to insert rows depending on the number in the "Total" column. Example: Row 2 has "1" in the column. I would like the macro to insert one row under row 2. If Row 2 had a "2" in the "Total" column I would want it to insert two rows. Any thoughts on how I would do this?

    Thanks

    Eddie
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Eddie

    See how this goes

    Please Login or Register  to view this content.
    rylo

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565
    Hi there,

    Ah, though rylo has beaten me to the punch here's my attempt (which incorporates some error trapping).

    One point to note is that based on the current number of entries and depending how many rows you're planning to insert, you'll quickly reach Excel's (2003) row limit.

    HTH

    Robert

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    300
    Thank you so much for your quick replies. I have been on the road and unable to get to the internet until now. Both of your options work great. This will save me a lot of time.

    Thank youu again so much.

    Eddie

+ 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