View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JW[_2_] JW[_2_] is offline
external usenet poster
 
Posts: 638
Default Only View Highlighted Rows

I'm not a fan on making selections in code at all, but this version
does run much quicker than the other I posted. Just giving you
options.
Sub test()
Dim selMade As Boolean, lRow As Long
selMade = False
Cells.EntireRow.Hidden = False
lRow = Cells.Find(what:="*", After:=[A1], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
For i = 2 To lRow
If Not Cells(i, 1).Interior.ColorIndex = 36 Then
If selMade = False Then
Cells(i, 1).Select
selMade = True
Else
Union(Selection, Cells(i, 1)).Select
End If
End If
Next i
Selection.EntireRow.Hidden = True
End Sub
duketter wrote:
Excel 2003 - How can I just view rows highlighted in yellow? I have an excel
spreadsheet with about 2000+ rows but I only want to view the rows that are
actually highlighted in yellow.

Thanks!