andrewb90
Well-known Member
- Joined
- Dec 16, 2009
- Messages
- 1,077
I have a macro that I am using and it seems to create an excess of lines at the bottom of the sheet that I not only am unable to delete, but cause me problems when trying to print. (I only want to print pages with information on it not, 150 extra pages with only a cell outline.)
Here is what I am using:
I am running Win 7 & Excel 2010
Any ideas on fixing this would be extremely helpful.
- Andrew
Here is what I am using:
Code:
Sub MONDAY()
Application.ScreenUpdating = False
With Sheets("Route")
.Rows("1:3000").Interior.Pattern = xlNone
.Rows("3:3000").Hidden = False
For Each cell In .Range("A3:A" & .Range("A" & Rows.Count).End(xlUp).Row)
If cell.Value = "Inactive" Or _
cell.Value = "Weekend" _
Or cell.Value = "ST" _
Or cell.Value = "TV" _
Or cell.Value = "FD" _
Or cell.Value = "NFD" _
Or cell.Value = "" Then
cell.EntireRow.Hidden = True
End If
Next
.Range(.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0), .Cells(Rows.Count, "A")).EntireRow.Delete
End With
Sheets("Route").Select
Rows("3:5").Hidden = False
Rows("6:8").Hidden = True
Rows("9:30").Hidden = True
Range("A1").Select
Application.ScreenUpdating = True
End Sub
I am running Win 7 & Excel 2010
Any ideas on fixing this would be extremely helpful.
- Andrew