Re: various printing from a hiden sheet
From: Don Guillett (donaldb_at_281.com)
Date: 03/07/05
- Next message: Bob Phillips: "Re: List of all names in EXCEL workbook"
- Previous message: SHIPP: "Error in Range Statement"
- In reply to: Shawn: "various printing from a hiden ***"
- Next in thread: Shawn: "RE: various printing from a hiden ***"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Mar 2005 10:36:49 -0600
try this. chg *** to yours and printpreview to printout
Sub printeachchange()
With Sheets("sheet5")
.Visible = True
LastRow = .Cells(Rows.Count, "b").End(xlUp).Row
For i = LastRow To 2 Step -1
y = Application.CountIf(.Range("b:b"), .Cells(i, "b"))
If .Cells(i - 1, "b") <> .Cells(i, "b") Then
.Cells(i, "b").Resize(y, 1).entirerow.PrintPreview
End If
Next i
.Visible = False
End With
End Sub
-- Don Guillett SalesAid Software donaldb@281.com "Shawn" <Shawn@discussions.microsoft.com> wrote in message news:60D43698-946D-492C-84BC-FCBBD5656EC3@microsoft.com... > I have a hidden *** with a table of data. Column B:B has various employee > names in it in desending alphabetical order. I would like a macro that > would, without selecting the page if possible, print out all rows of data > with employee A, then, on another ***, print out all rows of data with > employee B, then employee C and so on. > > For example, if Smith, Tom is repeated in Rows B2, B3, B4, I would want it > to print Rows 2, 3 and 4 on a *** of paper. Then if Thompson, Jill is > repeated in B5, B6, B7, I would want it to print rows 5, 6 and 7 on the next > ***. Please help. > > > -- > Thanks > Shawn
- Next message: Bob Phillips: "Re: List of all names in EXCEL workbook"
- Previous message: SHIPP: "Error in Range Statement"
- In reply to: Shawn: "various printing from a hiden ***"
- Next in thread: Shawn: "RE: various printing from a hiden ***"
- Messages sorted by: [ date ] [ thread ]