Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter and Print Problem
Here is a code I have...it isn't filtering and printing just right???? What
it prints out is the first line of everybody's data over and over, instead of printing out everything per person then cycling to the next person???? My apologizes for posting this again. Sheets("Stepdown3").Select Columns("B:B").Select For Each Cell In Selection.SpecialCells(xlConstants, 23) If Cell.Value < 0 Then Cell.Select With Sheets("Letter") .Range("C13").Value = Selection.Value .Range("E13").Value = Selection.Offset(0, -1).Value .Range("C14").Value = Selection.Offset(0, 1).Value .Range("I24").Value = Selection.Offset(0, 8).Value .Range("I27").Value = Selection.Offset(0, 7).Value .Range("I30").Value = Selection.Offset(0, 10).Value .PrintOut Copies:=1 End With Set sht = Sheets("Stepdown2") topRow = sht.Range("B1").End(xlDown).Row bottomRow = sht.Range("B65536").End(xlUp).Row Set NameRange = sht.Range("B" & topRow & ":B" & bottomRow) sht.AutoFilter Field:=1, Criteria1:=Sheets("Letter").Range("C13").Value, VisibleDropdown:=False sht.Visible = xlSheetVisible sht.PrintOut sht.Visible = xlSheetHidden End If Next Cell -- Thanks Shawn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter and Print Problem
The problem starts with "Sheet2". The "letter" sheet prints like it is
supposed to. "Shawn" wrote: Here is a code I have...it isn't filtering and printing just right???? What it prints out is the first line of everybody's data over and over, instead of printing out everything per person then cycling to the next person???? My apologizes for posting this again. Sheets("Stepdown3").Select Columns("B:B").Select For Each Cell In Selection.SpecialCells(xlConstants, 23) If Cell.Value < 0 Then Cell.Select With Sheets("Letter") .Range("C13").Value = Selection.Value .Range("E13").Value = Selection.Offset(0, -1).Value .Range("C14").Value = Selection.Offset(0, 1).Value .Range("I24").Value = Selection.Offset(0, 8).Value .Range("I27").Value = Selection.Offset(0, 7).Value .Range("I30").Value = Selection.Offset(0, 10).Value .PrintOut Copies:=1 End With Set sht = Sheets("Stepdown2") topRow = sht.Range("B1").End(xlDown).Row bottomRow = sht.Range("B65536").End(xlUp).Row Set NameRange = sht.Range("B" & topRow & ":B" & bottomRow) sht.AutoFilter Field:=1, Criteria1:=Sheets("Letter").Range("C13").Value, VisibleDropdown:=False sht.Visible = xlSheetVisible sht.PrintOut sht.Visible = xlSheetHidden End If Next Cell -- Thanks Shawn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
filter: how to print filter list options in dropdown box | Excel Discussion (Misc queries) | |||
Print Filter?? | Excel Worksheet Functions | |||
Print Filter? | Excel Discussion (Misc queries) | |||
filter 15 worksheets so i can print all on one page | Excel Worksheet Functions | |||
Applying second filter and set print area | Excel Programming |