ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Convert column data to semicolon delimited text string (https://www.excelbanter.com/excel-worksheet-functions/108583-convert-column-data-semicolon-delimited-text-string.html)

Richard RE

Convert column data to semicolon delimited text string
 
Hi,

I want to convert a column with let's say about 900 hundred rows with data
(numbers) into a single string, where the rows data are semicolon delimited.
How can I manage this?

Example:
column1
row1 123
row2 456
row3 876
row4 345

into a single string (semicolon delimited): 123;456;876;345

thanks for any help in advance!

//Richard

David Billigmeier

Convert column data to semicolon delimited text string
 
You can use the following UDF. Then within your sheet enter the formula:
=DelimCat(A1:A10,";")

Function DelimCat(rng As Range, delim As String)
For Each rn In rng
temp = temp & rn & delim
Next
DelimCat = Left(temp, Len(temp) - 1)
End Function


--
Regards,
Dave


"Richard RE" wrote:

Hi,

I want to convert a column with let's say about 900 hundred rows with data
(numbers) into a single string, where the rows data are semicolon delimited.
How can I manage this?

Example:
column1
row1 123
row2 456
row3 876
row4 345

into a single string (semicolon delimited): 123;456;876;345

thanks for any help in advance!

//Richard



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

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