+ Reply to Thread
Results 1 to 4 of 4

VBA to remove un-needed information

  1. #1
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    111

    VBA to remove un-needed information

    I am going to try to explain this the best I can because I am out of ideas on making this work.

    I get a report that comes out of an old banking system and it is compiled with some extra information that I always have to delete by hand - i do not want to do this any longer! Following are the steps that need to take place (i wish it was as simple as a loop) in order to get rid of the information.

    Step 1. Delete everything from the first document line until "Header Text" (leaving the header text in tact)
    Step 2. Delete everything from "Specific Wording" to next "Header Text" (leaving the header text in tact)
    Step 3. Repeat step two
    Step 4. Delete everything from "Specific Wording" to the very last line of the document.

    The problem i am having is that I do not know how to delete using the "header" or "specific words". I think this is going to have to be the way it is done because the amount of other text in between each header and specific words varies considerably. I got the whole "find text" vba thing going, i just need to fill in the blanks.

    Thanks

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: VBA to remove un-needed information

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    111

    Re: VBA to remove un-needed information

    .................

  4. #4
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    111

    Re: VBA to remove un-needed information

    i have hidden and protected the proprietary information, but here is the document i am working with. Yellow highlights are the "headers" and the red is the "Specific text".
    Attached Files Attached Files
    Last edited by Ada01; 06-28-2010 at 11:32 AM.

+ 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