Email address appears twice in cell info

dyanblak

New Member
Joined
Apr 18, 2014
Messages
17
Office Version
  1. 2016
Platform
  1. Windows
Hi all.
This in an annoying little problem which I am hoping there is a simple solution for by way of a formula or text to columns manipulation.
My raw data which is produced into a single cell is supposed to contain a name and then 2 spaces and an email address. Some of the cells contain the email address repeated twice in error. I need just the name and a single email address.

If eg cell A1 contains:
James Smith jsmith@ultra.com jsmith@ultra.com

How can I get rid of the duplication? Any suggestions GREATLY appreciated.
Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Good morning,
give this a go:
=IF(LEN(A1)-LEN(SUBSTITUTE(A1,"@",""))=2,LEFT(A1,FIND(" ",A1,FIND("@",A1,FIND("@",A1)))-1),A1)
You should be able to copy this down your data and it takes account of single or duplicate entries
 
Upvote 0
Good morning,
give this a go:
=IF(LEN(A1)-LEN(SUBSTITUTE(A1,"@",""))=2,LEFT(A1,FIND(" ",A1,FIND("@",A1,FIND("@",A1)))-1),A1)
You should be able to copy this down your data and it takes account of single or duplicate entries

Thank you Sparky - that is perfect. Wizardry indeed - much appreciated as will save me hours of manually tidying the spreadsheets :)
 
Upvote 0
This should also do it for you for singles or duplicates (or triplicates ...).

=LEFT(A1,FIND(" ",A1&" ",FIND("@",A1))-1)
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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