Solved

# Exporting email column as a Comma Separated Values

Posted on 2014-03-14
177 Views
Hi Folks,

I have an excel column with email addresses. How do I convert the column into a format like this, so that I can copy and paste into an email.

rg@abc.com, ab@abc.com,tt@abc.com

Thanks

RG
0
Question by:rgarimella
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 14

Expert Comment

ID: 39929407
You can select the column and then perform a  Text to Columns with a delimiter of comma
0

LVL 8

Accepted Solution

Naresh Patel earned 500 total points
ID: 39929412
Step 1 Formula in cell B2 =A2
Step 2 Formula in cell B3 =B2&","&A3
Step 3 Formula drop down
Done
0

LVL 30

Expert Comment

ID: 39929439
if your addresses are in Col A you can put this in B1
=A1 &","&A2&","&A3&","&A4

for sure you can add to as many rows as you have

if you have plenty then a small VBA can do it

``````Sub AddEmail()
Dim WS As Worksheet
Dim MaxRow As Long, I As Long

Set WS = ActiveSheet
MaxRow = WS.Range("A" & WS.Rows.Count).End(xlUp).Row

For I = 1 To MaxRow
If WS.Cells(1, "B") <> "" Then WS.Cells(1, "B") = WS.Cells(1, "B") & ","
WS.Cells(1, "B") = WS.Cells(1, "B") & WS.Cells(I, "A")
Next I
End Sub
``````

check the file
gowflow
email.xls
0

LVL 51

Expert Comment

ID: 39929448
Or as an UDF in VBA

``````Function fJoinEmails(rng As Range) As String
fJoinEmails = Join(WorksheetFunction.Index(WorksheetFunction.Transpose(rng), 1, 0), ", ")
End Function
``````
Regards
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
###### Suggested Courses
Course of the Month5 days, 4 hours left to enroll