0

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?

1
  • Are you working with a single dimension array? Commented May 13, 2016 at 14:58

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

edited to include cell set - just change cell and sheet name to match your own worksheet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.