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?
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
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:

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,388
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
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
 

The_ELK

New Member
Joined
Jul 1, 2015
Messages
17
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:

Lazzg

New Member
Joined
Feb 24, 2019
Messages
2
Hi,

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

Simple but should do the job.

Cheers
 

Watch MrExcel Video

Forum statistics

Threads
1,122,822
Messages
5,598,304
Members
414,224
Latest member
Crazy_FC

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
Top