S
ste mac
Hi, can anybody help please... I am trying to make the code below pick
up the range of data.. 'A1 down to the last value on each sheet', 2
thru 56
and paste it in the sheet "S1"...but I cannot get the scroll bit
right...
thanks
ste
Sub cdata()
Dim StartCell, EndCell As Range
Application.ScreenUpdating = False
For sheetNumber = 2 To 56
SheetName = "S" & Format(sheetNumber, "##0")
Sheets(SheetName).Select
Set StartCell = ActiveSheet.Range("A1")
Application.Goto reference:=ActiveSheet.Cells(ActiveSheet.Range
_("A1").Value + 1, "A"), Scroll:=False
'struggling with this bit
Set EndCell = ActiveCell
Range(StartCell, EndCell).Select
Selection.Cut
Sheets("S1").Range("A65536").End(xlUp).PasteSpecial
Paste:=xlPasteValues
Next
End Sub
up the range of data.. 'A1 down to the last value on each sheet', 2
thru 56
and paste it in the sheet "S1"...but I cannot get the scroll bit
right...
thanks
ste
Sub cdata()
Dim StartCell, EndCell As Range
Application.ScreenUpdating = False
For sheetNumber = 2 To 56
SheetName = "S" & Format(sheetNumber, "##0")
Sheets(SheetName).Select
Set StartCell = ActiveSheet.Range("A1")
Application.Goto reference:=ActiveSheet.Cells(ActiveSheet.Range
_("A1").Value + 1, "A"), Scroll:=False
'struggling with this bit
Set EndCell = ActiveCell
Range(StartCell, EndCell).Select
Selection.Cut
Sheets("S1").Range("A65536").End(xlUp).PasteSpecial
Paste:=xlPasteValues
Next
End Sub