|Subject:||Re: Hide Rows per criteria|
|Posted by:||Bob Phillips (bob.N…@xxxx.com)|
|Date:||Wed, 10 Jan 2007|
For Each cell In range("R4:R7000)
If Application.Countif("ICG",cell.Resize(,18)) > 0 Then
cell.EntireRow.Hidden = True
(change the xxxx to gmail if mailing direct)
"2D Rick" <rbrowni…@compuserve.com> wrote in message
>I need to look thru a range " Worksheets(1).Range("R4:AI7000") " row
> by row and hide the row if "ICG" is not in any of the 18 cells in that
> row. Similar to what AutoFilter does only in VBA.
> "ICG" can show up once or twice per row and in any position along the
> 18 cells.
> If "ICG" is found, do nothing and check next row.
> If found hide the row.
> Once printed I would like to un-hide all rows.
> Thanks, Rick
Hide Rows per criteria posted by 2D Rick on 10 Jan 2007