Thread: Array Question
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
mangesh_yadav[_77_] mangesh_yadav[_77_] is offline
external usenet poster
 
Posts: 1
Default Array Question

Sub Button1_Click()

i = 1
For Each sht In Worksheets
If sht.Name < "Sheet4" Then
For Each cell In sht.Range("A1:A10")
ActiveSheet.Cells(1, i) = cell
i = i + 1
Next
End If
Next

End Sub


this considers that you have data in 3 sheets and you have a total of
sheets only. all data is put in sheet4.

- Manges

--
Message posted from http://www.ExcelForum.com