View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Zych[_7_] Tim Zych[_7_] is offline
external usenet poster
 
Posts: 21
Default Concatenate a strings range.

Don't know about any built in function that will do that. A macro way:

Dim cell As Range, str As String
Dim delim As String
delim = ","
For Each cell In Range("A1:A100").Cells
If Len(cell.Value) 0 Then
str = str & cell.Value & delim
End If
Next cell

If Len(str) 0 Then
str = Left(str, Len(str) - Len(delim))
End If

"y" wrote in message ...
CONCATENATE accepts only single cells.

How can I concatencate contiguos cells (a range of strings) without

writing each cell reference by hand?

Only via VBA? And how?

Thank you Alex.