Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / September 2006

Tip: Looking for answers? Try searching our database.

Hide rows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shail - 28 Sep 2006 18:38 GMT
Hi,

I have a dropdown validation list. When I select an item from this
list, the rows below will be populated using the HLOOKUP function. The
HLOOKUP function brings the values from the other sheet. The records
will be one to one thousand. And I have the formula upto 1000 rows.
When item has just one value in it the other rows will have the value
zero.

I need to hide those rows which have the zero values. I could have use
the Autofilter, but I need it when the item is selected from the
dropdown list. So this could be done using VBA code.

Please help

Shail
Don Guillett - 28 Sep 2006 18:53 GMT
Not only are you posting the same thing over and over again you are posting
in several groups. Bad!!

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Hi,
>
[quoted text clipped - 12 lines]
>
> Shail
shail - 30 Sep 2006 13:55 GMT
Sorry Don,

I didn't mean to post is again and again but there was some problem in
the group and I couldn't be able to see my message appearing in the
group. And I posted it repeatedly.

Shail

> Not only are you posting the same thing over and over again you are posting
> in several groups. Bad!!
[quoted text clipped - 19 lines]
> >
> > Shail
PCLIVE - 28 Sep 2006 18:57 GMT
To get the code for doing this, click tools-macro-record macro.

Basically, place your autofilter manually while recording the action.  Then
you can use that code.

Here's an example of some code.
You could use something like this.

   Columns("I:I").Select  'this places the autofilter on column I
   Selection.AutoFilter
   Selection.AutoFilter Field:=1, Criteria1:="<>" & Range("B1").Value,
Operator:=xlAnd
   ' line above assumes that the validation dropdown is in B1

Right-click on the worksheet tab that you will be using this on.  Select
'View code'.  In left dropdown, select 'Worksheet'.  In right dropdown,
select 'Change'.  Then paste code.  That should get you started.

HTH,
Paul

> Hi,
>
[quoted text clipped - 12 lines]
>
> Shail
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.