help with the VB script
Try this :
in cell: =MyConcatenate(A1:A10) or any range
Function MyConcatenate(ByRef myrng As Range)
mystr = ""
For Each Cell In myrng
mystr = mystr + Str(Cell.Value) & ","
Next
MyConcatenate = Left(mystr, Len(mystr) - 1)
End Function
HTH
"Igneshwara reddy" wrote:
I need to run the script for concantenating the cells.
For eg: If I have 10 serial numbers in A1:A10, these numbers should
accompany with the ",". the result should come as 1,2,3,4,5,6,7,8,9,10
Often working with the formula is difficult, so I have planned to run macros.
Could any one pls guide me with the script.
|