Results 1 to 3 of 3

VBA Loop: Insert Row based on Criteria

Threaded View

Ada01 VBA Loop: Insert Row based on... 01-24-2013, 06:45 PM
rylo Re: VBA Loop: Insert Row... 01-24-2013, 06:57 PM
Ada01 Re: VBA Loop: Insert Row... 01-24-2013, 07:14 PM
  1. #1
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    111

    VBA Loop: Insert Row based on Criteria

    Hello

    It is final, I cannot master loops, they just do not make sense to me for whatever reason.

    We have a custom system that has been modified to present a report that is one step from being able to be uploaded. This reports is usually 50 - 75 transactions long and is being manually and incorrectly changed each week it is run.

    I need a macro that will start at the top of column A, ignore the header and run a macro until it reaches the last instance of a find function. Each time it finds the criteria it inserts a row above and adds a name to the field

    1. Find: "TRNS"
    2. Insert an entire row above the "TRNS" line.
    3. Select the Cell in Column A of the new line and type "ENDTRNS"
    4. Move on to the next instance and repeat until the last instance of "TRNS"

    I think this is going to be the best way. The other option is to look for "SPL" and add a line below, but there are instances where more than one "SPL" exists in a row and that code that i have tried just really messes with the end result.

    I have attached a sheet with the data source and the end result as it should look.

    Thanks for any help you can give.

    Adam
    Attached Files Attached Files
    Last edited by Ada01; 01-25-2013 at 12:37 AM.

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