range values

G

Guest

hi,

i would like to know if there is a way to take a range of cells like say
from A2 to A15, and read those values, putting thm into an array. and then
displaying them.. separated by commas in cell A1 (ONE cell only) of another
sheet?

Thanks in advance,
geebee
 
G

Guest

Sub ABC()
Dim cell as Range, s as String
for each cell in Worksheets("Sheet1").Range("A2:A15")
s = s & cell.value & ","
Next
worksheets("Sheet2").Range("B9").Value = Left(s,Len(s)-1)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top