Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default text from column to a list

I want to take a column of e-mail addresses and convert them into a list
seperated by a comma. Is there a way to do it? I have Excel 2000.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default text from column to a list

Try:

Sub Test()
Dim c As Range
Dim txt As String

txt = ""
For Each c In Selection.Cells
txt = txt & c.Value & ","
Next
txt = Left$(txt, Len(txt) - 1)
'Do whatever you want with txt
MsgBox txt
Set c = Nothing
End Sub

Regards,
Greg

"kraway" wrote:

I want to take a column of e-mail addresses and convert them into a list
seperated by a comma. Is there a way to do it? I have Excel 2000.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default text from column to a list

Hi,

I always use this, works horizontal and vertical range.

Jack Sons.


'************************************************* *************************
'Purpose: Merge cells, retaining all data
'Inputs: Selection
'Returns: Merged values in the first cell of rRng
'************************************************* *************************

' Merging the Selection INTO ONE CELL
'This macro merges the entire Selection into one cell. To include a
delimiter,
'change SDELIM, or insert columns between the cells and put the delimiter
'in those columns (make sure the last column is a delimiter column as well.

Public Sub MergeToOneCell()
'J.E. McGimpsey, http://www.mcgimpsey.com/excel/mergedata.html
Dim sDELIM As String 'Const sDELIM As String = ", "
sDELIM = InputBox("Input one or more characters for delimiter")
Dim rCell As Range
Dim sMergeStr As String
With Selection
For Each rCell In .Cells
sMergeStr = sMergeStr & sDELIM & rCell.text
Next rCell
Application.DisplayAlerts = False
.Merge Across:=False
Application.DisplayAlerts = True
.Item(1).Value = Mid(sMergeStr, 1 + Len(sDELIM))
End With
Selection.UnMerge
ActiveCell.Select
End Sub
"kraway" schreef in bericht
...
I want to take a column of e-mail addresses and convert them into a list
seperated by a comma. Is there a way to do it? I have Excel 2000.


--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
116 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!


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
COUNTIF: 2 criteria: Date Range Column & Text Column MAC Excel Worksheet Functions 14 September 16th 08 04:39 PM
Turning column contents into text list separated by a comma Kevin Rhinehart Excel Discussion (Misc queries) 1 January 16th 07 07:00 AM
To copy values in a column relevant to text in an adjacent column? Guy Keon Excel Worksheet Functions 2 November 15th 05 08:10 PM
Wrap text in column headers to fit text in column MarkN Excel Discussion (Misc queries) 10 November 11th 05 04:21 AM
How I can print full text bigger than column, in repeat column Prince Excel Discussion (Misc queries) 0 August 11th 05 07:28 PM


All times are GMT +1. The time now is 01:23 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"