View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Concatenate anyone?

Dim rng As Range
Dim cell as Range
Dim tmp As string

set rng = Application.InputBox("Select range with mouse",Type:=8)
If Not rng Is Nothing Then
For Each cell in rng
tmp = tmep & ","
Next cell
End If
Worksheets("Sheet2").Range("A1").value = _
Left(tmp,Len(tmp) - 1)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"dd" <dd.dd wrote in message ...
Does anyone know how to:
Select a group of cells, say in a table column,
concatenate the contents (perhaps separated by commas)
and copy over to a cell selected in Sheet2?

I tried to record a macro to do this then install a RefEdit into the
macro,
but I am a total bottom-eater at excel VBA.

Regards
Dylan Dawson
Scotland