J.Burger
J.Burger

Reputation: 1

combine multiple excel values from an array back into a single excel cell comma separated

I have multiple values that I'm reading into an array, but I need to paste those values into a single cell comma separated. Is this possible?

Upvotes: 0

Views: 287

Answers (1)

Dave
Dave

Reputation: 4356

You can Join an array with a given separator

myArray = Array("John","Bob","Mary")     
sString = Join(myArray, ",")
msgbox sString

Will give you "John,Bob,Mary" in sString...

To put this into a cell: Worksheets("Sheet1").Range("A1").Value = sString

Upvotes: 3

Related Questions