![]() |
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?????? |
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?????? |
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?????? |
All times are GMT +1. The time now is 07:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com