Created
December 23, 2010 19:51
-
-
Save josephmosby/753455 to your computer and use it in GitHub Desktop.
Simple script to hide spreadsheet rows based on criteria.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub HideRows() | |
Dim testRow As Integer | |
Dim testSht As Worksheet | |
Set testSht = Worksheets("Sheet1") | |
testRow = 2 | |
While Cells(testRow, 1).Value <> "Total" | |
If Cells(testRow, 2).Value = "" And Cells(testRow, 4).Value = "" And Cells(testRow, 6).Value = "" Then | |
If Cells(testRow, 1).Value <> "" Then | |
Rows(testRow).EntireRow.Hidden = True | |
End If | |
End If | |
testRow = testRow + 1 | |
Wend | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment