Sub Data_Filter()
Dim x as Integer-------------These are Variables
Dim Y as String--------------These are Variables
Application.ScreenUpdating = False-----------This Stops the screen from Flickering
On Error GoTo EndOfSection-------------This keeps your macro running when there is a error
For x = 1 to NumberofTrainings-------Start of a loop
Sheets("Sheet1").Select------------Selecting a Worksheet
Range("C2").Offset(x, 0).Select----------Selecting a range and then moving from that range
Y = Activecell------------------Telling a Variable what its value is
Sheets.Add.Name = NameofTab------------Creating a new worksheet
Range (ActiveCell.EntireRow.Address) (1, 1).Select----------Moving activecell to the beginning of a row
Next------------------------End of a loop
EndOfSection:-------------Where code breaks to when a error occurs
End Sub---------------Ends the macro
No comments:
Post a Comment