View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Hide and unhide shaded cells

For any one color............

EditFindFormatFormat....choose a color and OK find all.

CTRL + a to select all "found" items.

On menu bar FormatRowHide

If you have many colors to do you may want to use VBA instead.

Sub hide()
Dim rng1 As Range
Set rng1 = Range(Cells(, 1), Cells(Rows.Count, _
Cells(, 1).Column).End(xlUp))
For Each cell In rng1
If cell.Interior.ColorIndex < xlNone Then
cell.EntireRow.Hidden = True
End If
Next
End Sub


Gord Dibben MS Excel MVP


On Sat, 7 Mar 2009 18:28:15 +0000, Sylve
wrote:

Thank you Bob for your answer but I have a spreadsheet with aprox 4000
rows... I think half of them are coloured rows. Manually hiding 2000
random rows?? Hard job to do.
Let me ask the same question in a different way: How I sort a workbook
by shaded/unshaded cells ?