How do I separate a long string of emails with semi-colon?

The_ELK

New Member
Joined
Jul 1, 2015
Messages
17
Hello,

I have 1 Excel Cel (A1) with a long string of people email addresses without a bloody space. It's hard for me to insert this in Outlook without Outlook bombing out.

The Cell is like this as an example:

Yourname@email.comJAckTest@hotmail.comCNN@email.comNBA@cloud.comReception@compnay.com

<tbody>
</tbody>

What is the best formula to place a semi-colon between so that I can dump it in Outlook?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Yourname@email.comJAckTest@hotmail.comCNN@email.comNBA@cloud.comReception@compnay.com
Yourname@email.com;JAckTest@hotmail.com;CNN@email.com;NBA@cloud.com;Reception@compnay.com;=SUBSTITUTE(A1,".com",".com;")

but I think this is not representative example

you can use nested SUBSTITUTE again for .org .net etc
 
Last edited:
Upvote 0
In the examples below, cell B1 is a formula that deals only with .com email domains. You can nest it similar formulas if your list contains other domains like .org, .gov, .edu, .....

Cell B2 is a UDF that posted below the examples. For me it's an easier way to deal with multiple domains. If you install it then it can be used just like a worksheet function as in cell B2.
Excel Workbook
AB
1Yourname@email.comJAckTest@hotmail.comCNN@email.comNBA@cloud.comReception@compnay.comYourname@email.com;JAckTest@hotmail.com;CNN@email.com;NBA@cloud.com;Reception@compnay.com
2Yourname@email.comJAckTest@hotmail.govCNN@email.orgNBA@cloud.comReception@compnay.eduYourname@email.com;JAckTest@hotmail.gov;CNN@email.org;NBA@cloud.com;Reception@compnay.edu
Sheet3


UDF Alternative
Code:
Function EmailDelim(S As String, Delim As String) As String
Dim Domain As Variant, i As Long
Domain = Array(".com", ".org", ".edu", ".gov") 'add other domain as required
For i = LBound(Domain) To UBound(Domain)
    S = Replace(S, Domain(i), Domain(i) & Delim)
Next i
EmailDelim = Left(S, Len(S) - 1)
End Function
 
Upvote 0
but I think this is not representative example
you can use nested SUBSTITUTE again for .org .net etc

perfect, works like a charm

luckily, all my domains end with [.com] hahaha, I wouldnt bother if I had a mixture!!
 
Last edited:
Upvote 0
Hi,

Have you tried doing a find and replace. Find com and replace with com;

Simple but should do the job.

Cheers
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,513
Members
448,967
Latest member
screechyboy79

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