How to automatically remove all unacceptable entries from a CSV file?

geercom

New Member
Joined
May 23, 2017
Messages
1
I have an enormous contacts file in .CSV format with about 15,200 entries. Many entries are nonstandard, repeating the email address in the first name field or something like this. I want to automatically remove all of these nonstandard entries and leave all the ones that have a First and last name and an email address in their appropriate fields. How do you do this?

To make sure you understand the question, here's an illustration:

First Name Last Name Email Address

Bob Smith Bob@Smith.com {this is an example of a good, acceptable, "standard" (as I am using the word) entry}

Bob@Smith.com Bob@Smith.com {this is an example of an unacceptable entry of the kind I would like to remove}

And anything that does not follow the first example would also be nonstandard.

How do I remove all the nonstandard ones all at once?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I'm quite convinced Excel can't recognize it data in cell is a "name" or not. It can only detect all non-standard entries if you define them.
For example, you can make Excel check if @ is added in First name or Last name instead of e-mail address, but then if someone adds # instead of @ it will be marked as OK (unless you define ALL possible mistakes).
 
Last edited:
Upvote 0
first spacesecond space"@"decision
Bob Smith Bob@Smith.com4614KEEP
Bob@Smith.com Bob@Smith.com141004REMOVE
BobSmith Bob@Smith.com910013REMOVE
BobSmithBob@Smith.com#VALUE!10012REMOVE
Bob@Smith.com#VALUE!1004REMOVE
by finding where the first space is, where the second space is,
and where the @ is
putting 100 if there is no second space
and checking if the @ occurs after a second space
you get the ones to remove
these helper columns can be hidden away to the right

<colgroup><col><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top