Excel macros
Closed
bkballer2000
Posts
1
Registration date
Thursday February 12, 2009
Status
Member
Last seen
February 13, 2009
-
Feb 13, 2009 at 02:06 PM
Helper - Feb 13, 2009 at 03:10 PM
Helper - Feb 13, 2009 at 03:10 PM
Related:
- Excel macros
- Macros in excel download free - Download - Spreadsheets
- Excel marksheet - Guide
- Number to words in excel - Guide
- Excel apk for pc - Download - Spreadsheets
- Kernel for excel - Download - Backup and recovery
1 response
This assumes that the word "YES" is in column A.
Private Sub HideRows()
Dim intLastRow As Integer
Dim intRow As Integer
intLastRow = Range("A65536").End(xlUp).Row
For intRow = intLastRow To 1 Step -1
Rows(intRow).Select
If Cells(intRow, 1).Value <> "YES" Then
Cells(intRow, 1).Select
Selection.EntireRow.Hidden = True
End If
Next intRow
End Sub
Private Sub HideRows()
Dim intLastRow As Integer
Dim intRow As Integer
intLastRow = Range("A65536").End(xlUp).Row
For intRow = intLastRow To 1 Step -1
Rows(intRow).Select
If Cells(intRow, 1).Value <> "YES" Then
Cells(intRow, 1).Select
Selection.EntireRow.Hidden = True
End If
Next intRow
End Sub