Hi,

I am a complete novis at VBA and could really use some help.

I have a workbook with a number of worksheets that each represent attendance registers for different courses. I also have a separate workbook that holds the students on a particular programme. Not all the students on a programme will study all the courses. There could be 165 students on a programme, but only 45 of them study course 1 for example.

Each attendance register has columns that count the number of attendances and the number of absences for each student on that course. Students are identified by a unique student number.

I want to compare the student number on the programme sheet with the student numbers on each course attendance sheet and if they are the same, copy and paste the attendances and absences for each student in the same row on the programme sheet.

so I am starting with something like:

Programme Sheet:
Course 1 Course 2
Student Number: Attended Absent Attended Absent
1234 2 0 4 2
1345 1 2 0 6

Course Sheet:

Student Number: Week 1 Week2 Week 3 Attended Absent
1234 1 0 1 2 0
1345 1 0 0 1 2


I hope that makes sense, if anyone can help I would be grateful.