+ Reply to Thread
Results 1 to 4 of 4

Delete multiple rows in large dataset via AutoFilter?

  1. #1
    Forum Contributor
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2013
    Posts
    131

    Delete multiple rows in large dataset via AutoFilter?

    Hey folks! I have an odd issue where I need to exclude emails from a dataset I'm copying/pasting.

    Here's my code so far:
    Please Login or Register  to view this content.
    As you can see, the code here is pretty lengthy, but it works. My question is simply whether or not there's a way to accomplish the same thing in less code?

    I basically just need to delete any rows that have multiple pre-defined email address, i.e. delete any rows where the user email is @hotmail, @gmail, @icloud, etc.

    It works as is, so if not then it's not an issue, but it would be stellar to be able to add or remove email addresses to this in the future without having to copy/paste an entire section of code again.

    Thanks for any and all comments/tips in advance!

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Delete multiple rows in large dataset via AutoFilter?

    You may try something like this...

    List all your email domains in the following line in the code without * wildcard.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: Delete multiple rows in large dataset via AutoFilter?

    I basically just need to delete any rows that have multiple pre-defined email address, i.e. delete any rows where the user email is @hotmail, @gmail, @icloud, etc.
    Another option perhaps...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 08-15-2019 at 03:32 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Delete multiple rows in large dataset via AutoFilter?

    Hi !

    Quote Originally Posted by mrbusto71 View Post
    My question is simply whether or not there's a way to accomplish the same thing in less code?
    Yes via a child way like some samples in threads : a helper column with a formula which returns TRUE for rows to delete,
    a sort on this column then clear the group of rows at once ! And clear the helper column …

+ 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. Replies: 3
    Last Post: 10-20-2017, 12:40 AM
  2. Deduping Values in Large Dataset - 7K rows X 30 columns
    By onespeed in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-28-2015, 11:28 PM
  3. [SOLVED] Autofilter to delete multiple rows with multiple variables
    By Ravana in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-10-2015, 12:01 AM
  4. Replies: 3
    Last Post: 01-23-2014, 10:13 AM
  5. Eliminating rows at irregulat interval PROBLEM with large dataset
    By Volodos86 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-17-2013, 07:38 AM
  6. Vlookup for Multiple Values with Large Dataset
    By shanipk82 in forum Excel General
    Replies: 0
    Last Post: 02-06-2012, 05:11 PM
  7. Delete rows from a LARGE dataset
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2011, 05:50 PM

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