Re: Hide a row based on a cel value

Giganews Newsgroups
Subject: Re: Hide a row based on a cel value
Posted by:  Don Guillett (dguillet…@austin.rr.com)
Date: Wed, 17 May 2006

Here is one I did for someone on another group today.

Sub HideRowsPrint()
  vlr = Cells(Rows.Count, "d").End(xlUp).Row
  With Range(Cells(13, "D"), Cells(vlr, "D"))
    .AutoFilter Field:=1, Criteria1:="<>0"
ActiveSheet.PrintPreview
    .AutoFilter
    End With
End Sub

modified
Sub HideRowsPrint()
  vlr = Cells(Rows.Count, "e").End(xlUp).Row
  With Range(Cells(1, "e"), Cells(vlr, "e"))
    .AutoFilter Field:=1, Criteria1:="1"
  End With
End Sub

--
Don Guillett
SalesAid Software
dguillet…@austin.rr.com
"guillaume" <guillau…@discussions.microsoft.com> wrote in message
news:DCB04F7A-D753-4166-A868-05BD0BF93E…@microsoft.com...
> Hi,
>
> I am looking for a scirpt or function that would allow to hide a row based
> on a cel value. I looked at some sample macros but not knowledgeable
> enough
> to customize those macros and therefore get an error message. Thanks for
> any
> advise:
>
> I am creating a small project status report. Each row is an action item.
> As
> follow:
>
> #  Area          Task            Action Item      Owner        %Complete
>  --------------------------------------------------------------------------
> 1  Tech          Specs        Review specs    AL              50%
> 2  Tech          Specs        Complete p.4    BH              <25%
>
> ...etc
>
> The %Complete column uses a vailidation list with %100, 50%, <25% values.
> All I need is an automatic functions that hides for each a row (=an action
> item) if the %complete value is equal to %100.
>
> I am not a macro expert, so I tried some other technics using functions
> but
> unsucessfully.
>
> thanks in advance for any advise.
>
> Sincerly,
>
> G

Replies

None

In response to

Hide a row based on a cel value posted by Guillaume on Wed, 17 May 2006