Printing selected Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My worksheet contains data such as Name, Address, Tel, Age etc.
I would like to run a macro that would sort and print all the relevant rows
by Col I being Age

I would then have a printed page of all the names address etc who are aged
25yrs and a new page for the next age group and so on. My Data is constantly
being edited and new names Addresses etc added. My data starts at Row 6. So
at any time I can run a macro that will sort and print pages based on their
Age. I am stumped as to how I can achieve this. Please advise Detail on how I
do this as I am limited in my VB knowledge.

Many thanks
Laurie g
 
this idea should get you started. You will be using autofilter>printing the
page>filtering the next age

Sub printages()
For i = 22 To 25
Range("A1:D20").AutoFilter Field:=1, _
Criteria1:=i, Operator:=xlAnd
ActiveSheet.PrintPreview
Next i
Range("A1:D20").AutoFilter
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top