Hi,
I posted a thread before asking about how to take data from several sheets and list it all (consecutively) in one column in a separate sheet (summary). The problem was that the data (in column I) had differing number of rows on each sheet, and i wanted it all listed in one column in order of sheet number. RYLO helped out by writing some code to do this....
Sub aaa()
Sheets("Summary").Range("A:A").ClearContents
Sheets("Summary").Range("A1").Value = "distance"
For i = 1 To Sheets.Count
If Sheets(i).Name <> "Summary" Then
With Sheets(i)
.Range("A2:A" & .Cells(Rows.Count, 1).End(xlUp).Row).Copy Destination:=Sheets("Summary").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
End With
End If
Next i
End Sub
However, it didnt quite work, maybe becuase my data were in column I instead of column A. When I changed the column A within the code to column I, it returned #ref when i ran the code. Then, I tried to move the data to column A, but that also didnt work and 0 were returned.
Does anyone have any suggestions on what is going wrong?
thanks so much
Sarah
Bookmarks