I need a code to copy everything from various tabs in cells A:H (starting in row 3) and paste everything on the main tab starting in cell B5 and moving down?
My current code is:
Sub CopyToMainsheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Main" Then
ws.Activate
Range("A3:H3").Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("Main").Select
Range("b" & Cells.Rows.Count).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Next
End Sub
The issue with this code is that it doesn't go back to B5 if you do it more than once and keeps pasting below what has already been pasted. I need it to start pasting in B5 every time.
Thanks in advance