+ Reply to Thread
Results 1 to 2 of 2

Find the row a specific text is in a data set & delete certain rows

  1. #1
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Find the row a specific text is in a data set & delete certain rows

    Hello!

    I need some code that will do the following:

    Find all rows that contain the field names, in this order:

    "Oid", "Parent.Name", "LastVersion", "Ideas", "Scope", "Timebox.Name"

    Oid is in column A
    Parent.Name is in Column B
    LastVersion is in Column C
    Ideas is in Column D
    Scope is in Column E
    Timebox.Name is in Column F

    Once all rows have been identified, delete this row as well as the two rows that are above the field names.

    So if the VBA code has identified row 1000 that contains these field names, delete rows 1000, 999, 998.

    There will be around 40 times that these field names will be present and all 3 rows need to be deleted. So if these field names show up in 40 seperate rows independently, then there should be 120 rows that get deleted.

    Please let me know if you have any questions. Thank you so much!

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find the row a specific text is in a data set & delete certain rows

    Hi,

    try this example: RemoveOid.xlsm

    Contains:
    Please Login or Register  to view this content.
    and: http://www.cpearson.com/excel/BetterUnion.aspx

    Inform me if you need code explanation.

    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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