+ Reply to Thread
Results 1 to 9 of 9

Delete rows that do not contain an email address

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Delete rows that do not contain an email address

    Have a sheet with colunms First, Last, Address, City, State, Zip, Email. Some cells in the Email column contain a random value i.e. Z9A1BNSZ.

    Looking for a Macro that will delete all rows (records) that do not contain proper email addresses i.e. [email protected].

    Any help would be appreciated.

    Thanks.

    Davbuf

  2. #2
    Registered User
    Join Date
    11-26-2012
    Location
    Kitchener, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Delete rows that do not contain an email address

    Tri this
    Please Login or Register  to view this content.
    aelgadi

    > Click Star if I helped. Thanks

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Delete rows that do not contain an email address

    Thanks aelgadi. I'm getting this error:

    Run-time error '91':
    Object variable or With block variable not set

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete rows that do not contain an email address

    Assuming the data you wish to delete is in column A

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-26-2012
    Location
    Kitchener, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Delete rows that do not contain an email address

    that means didn't find any cell string that have "@". Have you adjusted range in the above macro cause mine assuming Column "A"

  6. #6
    Registered User
    Join Date
    11-26-2012
    Location
    Kitchener, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Delete rows that do not contain an email address

    This explains it
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-21-2012
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Delete rows that do not contain an email address

    Ok aelgadi. The email addressess are in Column G. I made the adjustment however the result was that the email addresses in column G simply lost all characters after the @. For example [email protected] turns into email1. Random values still remain (BPX2BFFU).

  8. #8
    Registered User
    Join Date
    08-21-2012
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Delete rows that do not contain an email address

    That worked AB33. Thanks! Thank you as well aelgadi.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete rows that do not contain an email address

    You are welcome!

+ 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