I have the following code that works fine, but requires me to edit data ranges and call on the same code repeatedly. The purpose of the code is to generate activity reports for each employee based on their name in the "Attendees" Column. It then takes this data and moves it to a separate sheet, making it easy for me to present the information at meetings. Currently, it is structured to do one employee at a time, and then call on the next one (each call is identical in structure, just a different name). Ideally, I would want to simplify the code to where I am not having to call on each employee, and that the range can update automatically based on what is in the data sheet.
Thank you for your help! I greatly appreciate your efforts. This is my first time coding, (ever), so any feedback will be appreciated!
- The Intern
Sub CopyAttendeeRecords1()
Dim AttendeesCol As Range
Dim Attendees As Range
Dim PasteCell As Range
Set AttendeesCol = Sheet7.Range("A2:A1003")
For Each Attendees In AttendeesCol
If Sheet8.Range("A2") = "" Then
Set PasteCell = Sheet8.Range("A2")
Else
Set PasteCell = Sheet8.Range("A1").End(xlDown).Offset(1, 0)
End If
If Attendees = "Name1" Then Attendees.EntireRow.Copy PasteCell
Next Attendees
Call CopyAttendeeRecords2
Call CopyAttendeeRecords3
Call CopyAttendeeRecords4
Call CopyAttendeeRecords5
Call CopyAttendeeRecords6
Call CopyAttendeeRecords7
Call CopyAttendeeRecords8
Call CopyAttendeeRecords9
Call CopyAttendeeRecords10
Call CopyAttendeeRecords11
Call CopyAttendeeRecords12
Call CopyAttendeeRecords13
Call CopyAttendeeRecords14
Call CopyAttendeeRecords15
Call CopyAttendeeRecords16
Call CopyAttendeeRecords17
End Sub
Display More