JumboCactuar
Well-known Member
- Joined
- Nov 16, 2016
- Messages
- 781
- Office Version
- 365
- Platform
- Windows
Hi,
i have this formula:
very bad coding i know lol but it works to an extent
i used this to get it from printing 87 blank pages to just 1
it seems to always print the pages with data + 1 blank page and not sure why
i have this formula:
Code:
Sub Macro5d() Sheets("Report").Select
Range("I21").Select
ActiveCell.FormulaR1C1 = "Time Taken"
Selection.Font.Bold = True
Range("I22").Select
ActiveCell.FormulaR1C1 = "(hh:mm:ss)"
Range("I23").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]="""","""",RC[-7]-R[-1]C[-7])"
Range("I23").Select
Selection.AutoFill Destination:=Range("I23:I4000"), Type:=xlFillDefault
Range("I23:I4000").Select
Selection.NumberFormat = "h:mm:ss"
Rows("21:21").Select
Selection.AutoFilter
ActiveSheet.Range("$A$21:$M$4000").AutoFilter Field:=9, Criteria1:="<>"
Sheets("Report").PrintOut Copies:=1
Sheets("Main").Select
End Sub
very bad coding i know lol but it works to an extent
i used this to get it from printing 87 blank pages to just 1
Code:
ActiveSheet.Range("$A$21:$M$4000").AutoFilter Field:=9, Criteria1:="<>"
it seems to always print the pages with data + 1 blank page and not sure why