Deliverable7
New Member
- Joined
- Apr 9, 2016
- Messages
- 33
I found this code which works very well for my use.
As my filtered list data set includes an unknown number of "Y" i need to include a variable to relplace the fixed +5 in the code below.
Any assistance appreciated.
As my filtered list data set includes an unknown number of "Y" i need to include a variable to relplace the fixed +5 in the code below.
Any assistance appreciated.
Code:
Sub SetPrint()
Set rowNo = Range("A:A").Find("Y", LookIn:=xlValues, lookat:=xlWhole)
If Not rowNo Is Nothing Then
ActiveSheet.PageSetup.PrintArea = Range("A" & rowNo.Row & ":H" & (rowNo.Row + 5)).Address
End If
End Sub