View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Special Print Instructions

I changed. It will filter your range a2:c last row of a, looking for 1,
2,3,etc at the end (member1, member2 ). If found it filters and prints. When
happy with this change .printPREVIEW to .printOUT. If all else fails, send
the file to my email below and I'll have a look.

Sub FilterAndPrint()
lr = Cells(Rows.Count, "a").End(xlUp).Row
On Error Resume Next
For i = 1 To 8
Set x = Columns("a").Find(i, LookIn:=xlValues)
If Not x Is Nothing Then
With Range("a2:c" & lr)
.AutoFilter Field:=1, Criteria1:="Member#" & i
.PrintPreview
.AutoFilter
End With
End If
Next i
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"GatorGirl" wrote in message
...
Don-You lost me. I copied your text into Visual Basic but not really sure
what the text means. If you could explain to an elementary visual basic
user.

Thank you-

"Don Guillett" wrote:

I might suggest using a for i next i loop with a filterdata filter
incorporated. Change to suit

Sub FilterAndPrint()
lr = Cells(Rows.Count, "m").End(xlUp).Row
On Error Resume Next
For i = 1 To 8
Set x = Columns("m").Find(i, LookIn:=xlValues)
If Not x Is Nothing Then
With Range("M2:Q" & lr)
.AutoFilter Field:=1, Criteria1:="Member#" & i
.PrintPreview
.AutoFilter
End With
End If
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"GatorGirl" wrote in message
...
I have a table in excel which contains the following type of data:

Column A Column B
Column C
Member#1 Member Name1 1st
Child
Name
Member#1 Member Name1 2nd
Child
Name
Member#1 Member Name1 3rd
Child
Name
Member#2 Member Name2 1st
Child
Name
Member#2 Member Name2 2nd
Child
Name
Member#5 Member Name5 1st
Child
Name

I want to print only the rows which are respective to member #1, then
member
#2 and so on.....I have about 4,000 rows and about 1,300 members.
Any Ideas?

Thank you-