Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
More Concatenate operation - Any help?
Create a UDF
Function JoinCells(rng As Range, Optional Delimiter As String = ",") Dim tmp As String If rng.Columns.Count 1 Then If rng.Rows.Count 1 Then JoinCells = CVErr(xlErrRef) Exit Function End If tmp = Join(Application.Transpose(Application.Transpose(r ng)), Delimiter) Else tmp = Join(Application.Transpose(rng), Delimiter) End If If Len(Delimiter) 0 Then Do Until Right(tmp, 1) < Delimiter tmp = Left(tmp, Len(tmp) - 1) Loop End If JoinCells = tmp End Function and use like =JoinCells(B1:M1,"") -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Vadhimoo" wrote in message ... Hi, I am having a more data in every column(around 100 columns..). I want to do concatenate all the cell values into the first column (A1=CONCATENATE(B1,C1,D1,..DC) A2=CONCATENATE(B2,C2,D2,....EA) Any macro? because total no of columns value may be changed. Thanks in advance for your reply. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Database operation | Excel Programming | |||
what does $ operation mean | New Users to Excel | |||
I know how to concatenate ,can one de-concatenate to split date? | New Users to Excel | |||
ilegal operation | Links and Linking in Excel | |||
Conditional operation | Excel Worksheet Functions |