+ Reply to Thread
Results 1 to 4 of 4

Delete entire rows if cells in column D contain TX

  1. #1
    Registered User
    Join Date
    05-26-2017
    Location
    Burnsville, MN
    MS-Off Ver
    2016
    Posts
    50

    Delete entire rows if cells in column D contain TX

    I'm looking for code that will delete an entire row if a cell in Column D contains TX. I'll attach the spreadsheet if someone wants to try. Basically every time I download this export, I want to be able to run the code to automatically filter out the rows that have an address in Texas.

    Example:

    Before
    Before.png

    After
    After.png

    Sample Sheet
    LeakData Tx Filter.xlsm

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete entire rows if cells in column D contain TX

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    05-26-2017
    Location
    Burnsville, MN
    MS-Off Ver
    2016
    Posts
    50

    Re: Delete entire rows if cells in column D contain TX

    That worked great! What can we do so the header does not get deleted as well? All the other data is fine, except the header goes away as well as addresses with "TX"

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete entire rows if cells in column D contain TX

    Please Login or Register  to view this content.

+ 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. Macro to delete entire rows if column d equals 2925-6 & abc
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-14-2015, 07:50 AM
  2. [SOLVED] Delete entire Rows if Column value is unique OR Duplicate is less than three
    By analystbank in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2014, 12:09 PM
  3. [SOLVED] Select column C and delete blank entire rows Till C300
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2014, 08:55 AM
  4. How to efficiently delete entire rows based on duplicates in one column
    By HughManatee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2013, 06:53 PM
  5. delete entire row if cells in column D contain certain value
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-15-2012, 12:10 PM
  6. macro to delete entire rows if certain cells are empty
    By wrightie in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-07-2009, 05:46 AM
  7. Delete entire rows where there is a blank in column A
    By Chris Hankin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2006, 05:00 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