PuntingJawa
Board Regular
- Joined
- Feb 25, 2021
- Messages
- 162
- Office Version
- 365
- 2019
- Platform
- Windows
I have a workbook that consolidates serial numbers for identification tags that get placed on crates.
I use this in a button to hide rows in the range of 2-681 based on weather or not information is in column B (Helper cell that places a 1 if there is greater than 1 in column G which is the QTY of that item).
I have set page breaks every 40 rows which separates based on crate.
My question is, is there a way to automatically exclude any of the hidden rows when printing? I know I can do it manually by highlighting what I want to print, but I am trying to keep this simplistic for less savvy users in case I take a day off.
Excel Formula:
Sub MyHideRows()
Dim r As Long
Application.ScreenUpdating = False
' Check rows 2:681
For r = 2 To 681
Rows(r).EntireRow.Hidden = (Cells(r, "B") = "")
Next r
Application.ScreenUpdating = True
End Sub
I use this in a button to hide rows in the range of 2-681 based on weather or not information is in column B (Helper cell that places a 1 if there is greater than 1 in column G which is the QTY of that item).
I have set page breaks every 40 rows which separates based on crate.
My question is, is there a way to automatically exclude any of the hidden rows when printing? I know I can do it manually by highlighting what I want to print, but I am trying to keep this simplistic for less savvy users in case I take a day off.