View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Excel - Find and Replace from rows to separation by commas


You can do this by macro

Sub AddCommas()
Set DataRange = Application.InputBox("Select data", , , , , , , 8)
Set TargetCell = Application.InputBox("Select target cell", , , , , , ,
8)
For Each Cell In DataRange
TargetString = TargetString & "," & Cell.Value
Next
TargetString = Right(TargetString, Len(TargetString) - 1)
TargetCell.Value = TargetString
End Sub


Martin


--
mrice


------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=533188