Breaking Names from List to individual pages

andreascostas

Board Regular
Joined
Jan 11, 2011
Messages
150
I have a spreadsheet that lists students test grades for various subjects. The columns are labeled as follows:

Column A: Student Name

Column B: Reading Score

Column C: Math Score

Column D: Science Score

Column E: Writing Score

I can have up to 30 students listed in column A with their corresponding grades. I need to somehow

Print a page for each kid along with their grades to send home to parents. Can excel be programmed

So that it creates a tab(page) for each kid?

Thank you.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Something like this? This code will filter the data on each name and print out the sheet.

Book1
ABCDE
1Student NameReading ScoreMath ScoreScience ScoreWriting Score
2A84827780
3B76686472
4C91899495
Sheet3


VBA Code:
Sub FilterAndPrint()
Dim r As Range: Set r = Range("A1:E" & Range("A" & Rows.Count).End(xlUp).Row)
Dim ar() As Variant: ar = r.Columns(1).Value

For i = 2 To UBound(ar)
    r.AutoFilter 1, ar(i, 1), xlFilterValues
    ActiveSheet.PrintOut
Next i

r.AutoFilter

End Sub
 
Upvote 0
I was able to run it once and it worked. Subsequently, it prints all the names on each page. Not sure what I am doing wrong.
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

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