Macro for a large report

Andy0311

Board Regular
Joined
Oct 16, 2019
Messages
118
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello,

I run a report which lists all 31 teachers on my staff and the number of lessons they have graded during a particular grading period. The format looks something like this(see below). What I have to do for each teacher is copy and post their grading information into another report. In the example below, it would be pretty straightforward to select the ranges and copy and paste them. The issue is that the number of lessons isn't two as shown for teacher 1, or one for teacher 2 in the example. Most teachers grade anywhere from 50-400 lessons. The last report contained 6510 rows. That makes selecting the range for eacher and cutting and pasting it involves a lot of scrolling. Is there a way a macro might do this using relative referencing to select the next teacher and run the macro? Is there a better way than a macro? Thanks in advance for your help.

Andy

StaffStudentDistrictCourse NameLessonDateMark
Teacher1
JoeGOVSHealthAllergy10/22/2019A
AndyGOVSPEWeights10/23/2019B
Teacher1 Units: 2
Teacher2
LizGOVSAlgebraIntro10/22/2019B
Teacher2 Units:1

<tbody>
</tbody>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hello there. Yes, a macro could well do it for you, but why not do a small redisgn of the data and then simply use a filter? You could remove the data currently in column A and instead put the teacher name against each student. Then just filter by the teacher name. Use a count formula to see how many Units there are. You wouldn't need to keep all of one teachers data together either.
 
Last edited:
Upvote 0
Hello there. Yes, a macro could well do it for you, but why not do a small redisgn of the data and then simply use a filter? You could remove the data currently in column A and instead put the teacher name against each student. Then just filter by the teacher name. Use a count formula to see how many Units there are. You wouldn't need to keep all of one teachers data together either.

Thank you so much. I will try it! I appreciate your help.

A
 
Upvote 0
You are welcome. If you do decide to go down that route, it would be possible to create a one-off macro that could populate the teachers names for you. If thats something you would like, get back - I'm in the UK so am leaving work soon but can look tomorrow).
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,706
Members
449,049
Latest member
THMarana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top