Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Special Print Instructions

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-
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Special Print Instructions

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-


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Special Print Instructions

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-



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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-




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a way to do 4 instructions with one macro des-sa[_2_] Excel Discussion (Misc queries) 1 May 14th 08 09:37 PM
I am unable to "print screen" flollowing the instructions in HELP aneruth Excel Discussion (Misc queries) 1 July 25th 06 04:45 PM
Print cell borders with special 'skin' DavieM Excel Discussion (Misc queries) 0 March 25th 06 10:52 PM
How to print detailed instructions for all functions in Excel? clark Excel Worksheet Functions 1 August 25th 05 10:47 AM
How to print detailed instructions for all functions in Excel? clark Excel Worksheet Functions 0 August 25th 05 04:26 AM


All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"