#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Hide Rows with 0's

I have a data table and in different columns a record may have a 0 in it. I
want to be able to write a simple line of code which hides any records with a
0 in it any were in its record.

any help??????
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Hide Rows with 0's

Say we have values in cols A thru Y. We are interested in zeros. In Z2 enter:

=IF(COUNTIF(A2:Y2,0)=25,25,IF(COUNTIF(A2:Y2,0)=0,0 ,1)) and copy down

Set the AutoFilter for column Z.

To see rows with all zeros, filter for 25
To see rows no no zeros, filter for 0
TO see rows with some zeros, set the filter for 1
--
Gary''s Student - gsnu200903


"Gazz_85" wrote:

I have a data table and in different columns a record may have a 0 in it. I
want to be able to write a simple line of code which hides any records with a
0 in it any were in its record.

any help??????

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Hide Rows with 0's

In a column to the side you could have a formula like this:

=IF(COUNTIF(A2:H2,0)0,"hide","ok")

(assuming your data occupies columns A to H) and copy this down. Then
apply autofilter to this column and select ok from the filter drop-
down.

If you want a macro to do it for you, then record a macro while you
apply the filter, then in future you can just re-run the macro.

Hope this helps.

Pete

On Sep 16, 2:41*pm, Gazz_85 wrote:
I have a data table and in different columns a record may have a 0 in it. I
want to be able to write a simple line of code which hides any records with a
0 in it any were in its record.

any help??????


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
Rows won't hide Marilyn Excel Discussion (Misc queries) 3 March 23rd 08 11:39 AM
cut rows without cutting hide rows מיכל Excel Discussion (Misc queries) 1 June 25th 07 02:01 PM
Hide Rows - copy and paste only rows that show Access101 Excel Worksheet Functions 3 March 1st 06 12:39 AM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"