Hi! I have a spreadsheet I am working on in which multiple columns have variable amounts of data input. I only want to print down to the last row filled in.
All data is entered in column F. I am using the following macro (found here):
Sub PrintA()
'prints rows of data, will not print rows if column F is blank
Application.ScreenUpdating = False
Range("F:F").EntireRow.Hidden = False
Range("F:F").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Range("F:F").EntireRow.Hidden = False
Application.ScreenUpdating = True
End Sub
The problem is, I have other fields off to the side that extend down to row-18. If only a few items are entered into column F (that is, if the data doesn't fill through row-18), this macro cuts off all of that extra information.
I want to always print through row-18, and after that have it cut off after the last item entered in column F.
Thanks!
Bookmarks