Results 1 to 4 of 4

Macro for Automatic Row Insertion

Threaded View

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Brampton
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro for Automatic Row Insertion

    Working on some automation for my company’s shipping data and was looking for a little Macro help. A test file has been attached.

    Basically, what I want to do is for each row starting on Row 3, the Macro would check the number in the corresponding cell under Column G. If the number is 1, the next row would be checked. If the number is more than 1, the Macro would automatically insert a number of rows equal to the number in the cell minus one (taking Row 4 of the sample file, the number of pieces equals 5 so four rows would be inserted beneath Row 4). Then it would go to the next row which has a filled number in it and repeat the process all the way to the end of the sheet.

    The Stop condition for the row insertion portion of the Macro should be when Excel detects that in the corresponding cell of Column G, the value equals 0.

    I hope I explained this properly. If not, let me know and I'll answer what questions I can.
    Attached Files Attached Files

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