range values

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top