Instead of using multiple cells and then having to copy/paste into a text file, how about simply creating the text file itself?
The code below will loop through the cells in column A (from A1 to the last used row in column A) and output each cell's text into a text file (.txt). All of the entries will be separated by commas.
Sub CommaExport()
Dim DestFile As String, FileNum As Long, RowCount As Long
DestFile = "C:\emails.txt"
FileNum = FreeFile()
On Error Resume Next
Open DestFile For Output As #FileNum
If Err <> 0 Then
MsgBox "Cannot open filename " & DestFile
End
End If
On Error GoTo 0
For RowCount = 1 To Range("A65536").End(xlUp).Row
Print #FileNum, Cells(RowCount, 1).Text & ", ";
Next RowCount
Close #FileNum
End Sub
Change the value of 'DestFile' to the path and file name you desire.
Bookmarks