+ Reply to Thread
Results 1 to 5 of 5

Recognize certain text in a column and delete subsequent rows automatically

  1. #1
    Registered User
    Join Date
    03-24-2015
    Location
    Illinois
    MS-Off Ver
    MS Office 2010
    Posts
    21

    Recognize certain text in a column and delete subsequent rows automatically

    All,
    This is a continuation of a previous post I made here (https://www.excelforum.com/excel-pro...ml#post4663914 that was solved. However, I am now trying to completely automate this spreadsheet based on how the raw data is gathered.

    The easiest thing for me to do was to record a macro to delete the first twelve lines of data and then format the data from text to columns. I then COULD use the code that was mentioned in the link if it wasn't for one problem:

    Rows 53,54,55 and then 55 rows from those rows (i.e. rows 108, 109, 110 and then rows 163, 164, and 165, and this repeats until the end of the data) have data that I don't want to be included because it basically is just text from when the data was copied from its original source as a text file. Is there a way for excel to recognize this text and then subsequently delete those rows. What each row says in column A is the following:

    Row 53 Column A: Archive Report TA
    Row 54 Column A: Time
    Row 55 Column A: -----------------

    Then as I stated before, this just repeats for rows 108, 109 and 110, and so on until the end of the data. Ideally, I'd like the code to be like the following:

    Please Login or Register  to view this content.
    Any help is appreciated. Thanks.
    Last edited by Swishmak3r; 06-07-2017 at 01:32 AM. Reason: Solved

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Recognize certain text in a column and delete subsequent rows automatically

    Hi Swishmak3r,

    Excel has an Add-In for 2010 called Power Query, that can do this problem easily. You can install it from:
    https://www.microsoft.com/en-us/down...4-2178abff26de

    You would pull in your data and then remove all rows that you don't want.

    https://www.youtube.com/watch?v=TWRiKhNnsU8
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-24-2015
    Location
    Illinois
    MS-Off Ver
    MS Office 2010
    Posts
    21

    Re: Recognize certain text in a column and delete subsequent rows automatically

    Thanks MarvinP. However, I need something a little more less user friendly because I doubt with the security of my job we'd be allowed to download that add-in without significant help from our IT department. However, I did some google search and I got my code. But maybe you can help me with this problem. Is there a way to create a macro-enable spreadsheet template where all one has to do is copy the data in this spreadsheet, hit a button, and be done with it. I'm trying to make that as user friendly as possible so that way someone doesn't have to copy this code into a new module everytime new data is downloaded.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Recognize certain text in a column and delete subsequent rows automatically

    You can create a macro enabled workbook and save it as an .xlsm. A person could then copy data into it and perform the macro on any data that is there.

    Was that the question?

    The Add-In IS from Microsoft. It is built into Excel 2016 and is called Get & Transform. It is simply another tool in Excel.

  5. #5
    Registered User
    Join Date
    03-24-2015
    Location
    Illinois
    MS-Off Ver
    MS Office 2010
    Posts
    21

    Re: Recognize certain text in a column and delete subsequent rows automatically

    Thanks MarvinP for the reply. I am going to try this out b/c that seems REALLY simple. I'll let you know in a few days how it goes on some test data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula to automatically recognize a construction column type
    By chriskay in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-06-2017, 11:59 AM
  2. Macro to keep rows that have certain text in one column, delete rows that do not.
    By mandalope in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2014, 02:35 PM
  3. URGENT: delete groups of column with out a subsequent value
    By exlgh91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2013, 10:46 AM
  4. update the subsequent rows at each change in other column
    By pavan.dhoke in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-28-2011, 05:49 AM
  5. Vlookup to automatically recognize column to extract from
    By efernandes67 in forum Excel General
    Replies: 2
    Last Post: 01-06-2010, 02:20 PM
  6. [SOLVED] Delete all rows where Column A contains Text
    By JE McGimpsey in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 06:05 AM
  7. [SOLVED] Delete all rows where Column A contains Text
    By JE McGimpsey in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 04:05 AM

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