I have a macro that I need to loop through specific worksheets, but I built the code through many examples I found online. So I am not quite sure where or how to set the loop and I'm also certain I would have to change the way the whole code is set up. I really have no coding knowledge at all. Meep.
Sub datatransfer()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets(ActiveSheet.Name)
Set pasteSheet = Worksheets("CMICIMPORT")
copySheet.Range("A100:AA124").Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
MsgBox "Data was copied over to the CMICIMPORT tab successfully", vbInformation, ActiveSheet.Name
Range("M4").Select
With Selection.Font
.Color = -11489280
.TintAndShade = 0
End With
End Sub
I have to run the code above on each sheet that I am currently on as opposed to being able to run the Macro and it runs on all of my payroll tabs. Also my tabs are named payroll (1), payroll (2) and so forth through payroll (200) if this makes it easier to help me.