ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   combine rows into one cell separated by comma (https://www.excelbanter.com/excel-discussion-misc-queries/76224-combine-rows-into-one-cell-separated-comma.html)

Miki Jo

combine rows into one cell separated by comma
 
Need to combine 100 email addesses in separate rows (in Excel) into one cell,
separated by comma, so I can do mass mail. Formula I'm trying won't work.

Ron de Bruin

combine rows into one cell separated by comma
 
hi Miki Jo

You can use code or a function like this to do it
http://www.mcgimpsey.com/excel/udfs/multicat.html


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Miki Jo" <Miki wrote in message ...
Need to combine 100 email addesses in separate rows (in Excel) into one cell,
separated by comma, so I can do mass mail. Formula I'm trying won't work.




Gord Dibben

combine rows into one cell separated by comma
 
Miki

Function ConCatRange(CellBlock As Range) As String
Dim cell As Range
Dim sbuf As String
For Each cell In CellBlock
If Len(cell.text) 0 Then sbuf = sbuf & cell.text & ","
Next
ConCatRange = Left(sbuf, Len(sbuf) - 1)
End Function

usage would be =ConCatRange(A1:A100)


Gord Dibben MS Excel MVP

On Thu, 9 Mar 2006 09:41:29 -0800, Miki Jo <Miki
wrote:

Need to combine 100 email addesses in separate rows (in Excel) into one cell,
separated by comma, so I can do mass mail. Formula I'm trying won't work.




All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com