Thread: hiding rows
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Bumblebee Bumblebee is offline
external usenet poster
 
Posts: 18
Default hiding rows

Thank you but the macro doesn't work. It doesn't seem to like the part:
CellsInRow = Replace("S#,AB#,AK#,AT#,BC#,BL#,BU#,CD#,CM#,CV#", "#",
TestRow.Row)

"Charlie" wrote:

Dim Cell As Range
Dim TestRow As Range
Dim CellsInRow As String

Rows.Hidden = False

For Each TestRow In Range("A24:A158")
CellsInRow = Replace("S#,AB#,AK#,AT#,BC#,BL#,BU#,CD#,CM#,CV#", "#",
TestRow.Row)

For Each Cell In Range(CellsInRow)
If Cell.Value <= -0.012 Then
Rows(Cell.Row).Hidden = True
Exit For
End If
Next Cell

Next TestRow


"Bumblebee" wrote:

I've got a table that goes form rows 24 to 158 and from colums D to DC and I
want the macro to search colums S, AB, AK, AT, BC, BL, BU, CD, CM, CV, and if
any cell in one of these columns has a number equal to or lower that -0.012
then that row I want shown, the rest hidden. How would I go about
constructing a macro to do this?