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 / New Users / April 2004

Tip: Looking for answers? Try searching our database.

Hide rows with zero value?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steven - 12 Apr 2004 10:57 GMT
just wondering how I would be able to hide rows on sheets if some cells are
blank? the cells contain formulas they are only blank because `zero
values` in >tools>options>view is unchecked.

I have a sheet set up to SUMIF values from about 16 other sheets, and it
returns the values depending on 72 corresponding codes, I would like to hide
any of the 72 rows of data that are blank.

the values returned will change on a week to week and daily basis, so I
would like to be able to use the same design for each new week, hope that
makes sense.
Frank Kabel - 12 Apr 2004 11:16 GMT
Hi
try something like the following:
Sub hide_rows()
Dim RowNdx As Long
Dim LastRow As Long

LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
       If Cells(RowNdx, "A").Value = "" Then
           Rows(RowNdx).hidden = True
       End If
Next RowNdx
End Sub

hides all blank rows in column A

Signature

--
Regards
Frank Kabel
Frankfurt, Germany


> just wondering how I would be able to hide rows on sheets if some
> cells are blank? the cells contain formulas they are only blank
[quoted text clipped - 8 lines]
> I would like to be able to use the same design for each new week,
> hope that makes sense.
Dave Hawley - 12 Apr 2004 11:45 GMT
Hi Steven

A good way to do this is via Data>Filter>Auto Filter. Hide the un-needed
rows, then go to View>Custom Views and "Add" the View with a name like
"HideZero". Next time you need it simply show the View or Record a macro
showing it. The good thing is you don't need Auto Filters applied before
showing the saved View.
Dave Hawley - 12 Apr 2004 11:53 GMT
....or, if Colulmn "A" has the cells to check for Zero, use some code
like;

Sub HideZeros()
Dim rRange As Range
   For Each rRange In Range("A1", Range("A65536").End(xlUp))
       rRange.EntireRow.Hidden = _
       (rRange = 0 And Len(rRange) = 1)
   Next rRange
End Sub
Steven - 12 Apr 2004 12:12 GMT
Dave when i high light the rows and go to data filter, autofilter is not an
option i can use.

i need something that will say look at colum I, (I contains totals of rows
B3-H3 down to B71-H71) if any of the cells from I3-I71 have a zero value,
hide row 3,4,5,6,,,,  71  etc, hope thats as clear as mud :)

> just wondering how I would be able to hide rows on sheets if some cells are
> blank? the cells contain formulas they are only blank because `zero
[quoted text clipped - 7 lines]
> would like to be able to use the same design for each new week, hope that
> makes sense.
Ken Wright - 12 Apr 2004 12:57 GMT
So select just Col I (Or the cell with your header in, down to the last cell of
data), do Data / Filter / Autofilter and then Filter on 'Not Equal to 0'

Signature

Regards
          Ken.......................    Microsoft MVP - Excel
             Sys Spec - Win XP Pro /  XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

> Dave when i high light the rows and go to data filter, autofilter is not an
> option i can use.
[quoted text clipped - 16 lines]
> > would like to be able to use the same design for each new week, hope that
> > makes sense.
Dave Peterson - 12 Apr 2004 22:53 GMT
A couple of reasons that Data|filter|Autofilter isn't available:

1.  Your worksheet is protected
   (tools|Protection|unprotect worksheet  to check.  You may need a password.)

2.  Your worksheet is grouped with another worksheet.
   Check the title bar.  Do you see something like "book1.xls [Group]"
   If yes, right click on a worksheet tab and select "Ungroup Sheets"

> Dave when i high light the rows and go to data filter, autofilter is not an
> option i can use.
[quoted text clipped - 16 lines]
> > would like to be able to use the same design for each new week, hope that
> > makes sense.

Signature

Dave Peterson
ec35720@msn.com

Steven - 12 Apr 2004 23:10 GMT
Its not protected or grouped

> A couple of reasons that Data|filter|Autofilter isn't available:
>
[quoted text clipped - 25 lines]
> > > would like to be able to use the same design for each new week, hope that
> > > makes sense.
Ken Wright - 12 Apr 2004 23:16 GMT
Either we are all talking by each other here, or something is screwy somewhere.
This is something that would usually be a 2 second job to most of the regulars,
so I know we're not all losing it.  Are you able to send me the file at all so I
can take a look first hand, only we've pretty much covered most things it could
be??

ken.wright [at] ntlworld.com

Signature

Regards
          Ken.......................    Microsoft MVP - Excel
             Sys Spec - Win XP Pro /  XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

<snip>

Dave Peterson - 12 Apr 2004 23:17 GMT
What happens when you try it?

Is it just disabled or does something else happen (error message)?

If you try it against a test worksheet in a new workbook, does it work?

> Its not protected or grouped
>
[quoted text clipped - 41 lines]
> > Dave Peterson
> > ec35720@msn.com

Signature

Dave Peterson
ec35720@msn.com

Ken Wright - 12 Apr 2004 23:53 GMT
Dave

Not Shared
Not Grouped
Sheet not Protected
Workbook not protected
Track changes not enabled
Autofilter greyed out, but Advanced Filter available as an option - Same on
every part of the worksheet(s)/book I tried
All Tools / Trace Options greyed out
Putting Autofilter on another sheet in a new book and moving the sheet to this
book results in loss of the Autofilter, BUT, Data / Filter / Autofilter is
checked albeit greyed out??

??

Signature

Regards
          Ken.......................    Microsoft MVP - Excel
             Sys Spec - Win XP Pro /  XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

<snip>
com

Frank Kabel - 13 Apr 2004 00:03 GMT
Hi Ken
this sounds as if the workbook is somehow corrupted (very interesting).

Signature

--
Regards
Frank Kabel
Frankfurt, Germany


> Dave
>
[quoted text clipped - 11 lines]
>
> ??
Ken Wright - 12 Apr 2004 23:55 GMT
And if I move the test sheet I put into the book back out of the book where it
came from, the autofilter is reactivated??

Signature

Regards
          Ken.......................    Microsoft MVP - Excel
             Sys Spec - Win XP Pro /  XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

<snip>

Debra Dalgleish - 13 Apr 2004 00:11 GMT
One more thing to try --
Choose Tools>Options
On the View tab, under Objects, select Show All, or Show Placeholders.

> Its not protected or grouped
>
[quoted text clipped - 55 lines]
>
>>>>makes sense.

Signature

Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Dave Peterson - 13 Apr 2004 00:20 GMT
Oooooh.  I like this one!

> One more thing to try --
> Choose Tools>Options
[quoted text clipped - 69 lines]
> Excel FAQ, Tips & Book List
> http://www.contextures.com/tiptech.html

Signature

Dave Peterson
ec35720@msn.com

Ken Wright - 13 Apr 2004 00:25 GMT
Deb, YOU ARE JUST TOO DAMNED GOOD AT THIS!!!!!!!!!!!!!!!!!   <vbg>

That fixed it  :-)

Signature

Regards
          Ken.......................    Microsoft MVP - Excel
             Sys Spec - Win XP Pro /  XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

> One more thing to try --
> Choose Tools>Options
[quoted text clipped - 59 lines]
> >
> >>>>makes sense.
Steven - 13 Apr 2004 00:42 GMT
Thanks everyone for your help!

xxx

> One more thing to try --
> Choose Tools>Options
[quoted text clipped - 59 lines]
> >
> >>>>makes sense.
Steven - 13 Apr 2004 00:53 GMT
Debs could you explain what show placeholders does? i do not understand what
this had to do with autofilter not showing?

Thanks :)

Steve

> One more thing to try --
> Choose Tools>Options
[quoted text clipped - 59 lines]
> >
> >>>>makes sense.
Debra Dalgleish - 13 Apr 2004 01:59 GMT
The arrows in the AutoFilter heading cells are hidden if objects are
hidden. So, if objects are hidden before the AutoFilter is in place,
Excel won't allow you to create an AutoFilter (I'm not sure if that's a
bug or a feature).

If Show Placeholders is selected, some objects, such as charts, are
represented by an outline. Other objects, like AutoFilter arrows, are
visible, so when that option is selected, you can create or use an
AutoFilter.

> Debs could you explain what show placeholders does? i do not understand what
> this had to do with autofilter not showing?
[quoted text clipped - 68 lines]
>>>
>>>>>>makes sense.

Signature

Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
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



©2008 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.