Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Splitting a row of email addresses

I have a cell containg a row of email addresses seperated with semicolons.

For example, ; ; ;...

I'd like to spit them into a vertical list with a single address per cell
that I could use to create a distribution list, but I can't figure out how
to do it.

eg:
;
;
;
..
..
..

Any ideas would be appreciated.

Sincerely,
Jim Berglund

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Splitting a row of email addresses

If the list had no more entries than the number of columns in the worksheet, you
could use:

Data|text to columns|delimited by semicolon
then edit|copy
then edit|paste special transpose.

Do you really want that trailing semicolon?

Jim Berglund wrote:

I have a cell containg a row of email addresses seperated with semicolons.

For example, ; ; ;...

I'd like to spit them into a vertical list with a single address per cell
that I could use to create a distribution list, but I can't figure out how
to do it.

eg:
;
;
;
.
.
.

Any ideas would be appreciated.

Sincerely,
Jim Berglund


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Splitting a row of email addresses

Or if you're using xl2k or higher, you could use something like this:

Option Explicit
Sub testme01()

Dim myStr As String
Dim mySplit As Variant

myStr = ActiveCell.Value
mySplit = Split(myStr, ";")

ActiveCell.Offset(0, 1).Resize(UBound(mySplit) _
- LBound(mySplit) + 1, 1).Value _
= Application.Transpose(mySplit)

End Sub

(Split was added in xl2k.)



Jim Berglund wrote:

I have a cell containg a row of email addresses seperated with semicolons.

For example, ; ; ;...

I'd like to spit them into a vertical list with a single address per cell
that I could use to create a distribution list, but I can't figure out how
to do it.

eg:
;
;
;
.
.
.

Any ideas would be appreciated.

Sincerely,
Jim Berglund


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Splitting a row of email addresses

Many thanks - it worked perfectly, and I researched out how it did it.
Pretty Clever!
Jim

"Dave Peterson" wrote in message
...
Or if you're using xl2k or higher, you could use something like this:

Option Explicit
Sub testme01()

Dim myStr As String
Dim mySplit As Variant

myStr = ActiveCell.Value
mySplit = Split(myStr, ";")

ActiveCell.Offset(0, 1).Resize(UBound(mySplit) _
- LBound(mySplit) + 1, 1).Value _
= Application.Transpose(mySplit)

End Sub

(Split was added in xl2k.)



Jim Berglund wrote:

I have a cell containg a row of email addresses seperated with
semicolons.

For example, ; ; ;...

I'd like to spit them into a vertical list with a single address per cell
that I could use to create a distribution list, but I can't figure out
how
to do it.

eg:
;
;
;
.
.
.

Any ideas would be appreciated.

Sincerely,
Jim Berglund


--

Dave Peterson


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Macro how to create email link for the email addresses in aRange or Selection Satish[_2_] Excel Worksheet Functions 8 December 28th 09 03:30 PM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM
send email with email addresses in a range of cells Craig[_24_] Excel Programming 1 October 10th 05 09:26 PM
Move a Column of 500 Email Addresses into BCC Field of an Email Mark Excel Worksheet Functions 9 July 27th 05 05:07 AM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"