View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Minh Minh is offline
external usenet poster
 
Posts: 3
Default Macro to hide multiple rows

Hi,

I am writing a macro at the moment that hides a row given
a certain criteria is met. However, at the moment I have
had to do this on a row by row basis:

e.g.
If A8 = Cat Then
Rows("8:8").Select
Selection.EntireRow.Hidden = True
End If
If A9 = Cat Then
Rows("9:9").Select
Selection.EntireRow.Hidden = True
End If

etc....

Is there a way to do this to a range of cells rather than
on a cell by cell basis?

Thanks heaps.