I'm sure that this is a relatively simple query, but to say I'm an amateur with VBA would be a compliment.
What I'm trying to do is use a macro button to copy certain information from one sheet to a mastersheet. This is working fine, until I hide the rows (there are 880 rows in total and given that these sit alongside data entry tables, I kinda need to hide them to ease navigation).
This is the code that I am presently using - could it be amended so as to include hidden rows?
Thank you in advance,
Rob
Private Sub CopyDataTeam1()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = ActiveSheet
Set pasteSheet = Worksheets("MainData")
copySheet.Range("AY5:BC5", copySheet.Range("AY5:BC5").End(xlDown)).Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Sheets("MainData").Cells.Replace What:="-", Replacement:="", LookAt:=xlWhole, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub