Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Hide Entire Row If Cell = 0

I have a large area that contains a lot of zero's, I want to be able to put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hide Entire Row If Cell = 0

Hi Sean

Why not AutoFilter for 0 ?
Or do you want to hide without a filter

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Sean" wrote in message ...
I have a large area that contains a lot of zero's, I want to be able to put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hide Entire Row If Cell = 0

More info

Custom..Not contain 0

Record a macro when you do it and look at the code


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi Sean

Why not AutoFilter for 0 ?
Or do you want to hide without a filter

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Sean" wrote in message ...
I have a large area that contains a lot of zero's, I want to be able to put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Hide Entire Row If Cell = 0

Hide witout a filter, there is data above the specified starting row of AL35
that I dont want included. Thats why I would like a macro to do this, for
the specified data range of AL35 through AL609

Thanks,

Sean

"Ron de Bruin" wrote:

Hi Sean

Why not AutoFilter for 0 ?
Or do you want to hide without a filter

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Sean" wrote in message ...
I have a large area that contains a lot of zero's, I want to be able to put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hide Entire Row If Cell = 0

See Bob's reply for a example

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Sean" wrote in message ...
Hide witout a filter, there is data above the specified starting row of AL35
that I dont want included. Thats why I would like a macro to do this, for
the specified data range of AL35 through AL609

Thanks,

Sean

"Ron de Bruin" wrote:

Hi Sean

Why not AutoFilter for 0 ?
Or do you want to hide without a filter

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Sean" wrote in message ...
I have a large area that contains a lot of zero's, I want to be able to put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Hide Entire Row If Cell = 0

For Each cell In Range( "AL35:AL609")
cell.Entirerow.Hidden = cell.Value = 0
Next cell

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
...
I have a large area that contains a lot of zero's, I want to be able to

put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Hide Entire Row If Cell = 0

I hate to be a pain, but is there a way if I put a check box out there, if it
is checked it does the following code, and if unchecked it makes the row
visible?

"Bob Phillips" wrote:

For Each cell In Range( "AL35:AL609")
cell.Entirerow.Hidden = cell.Value = 0
Next cell

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
...
I have a large area that contains a lot of zero's, I want to be able to

put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Hide Entire Row If Cell = 0

When I typed in the code I got an error when I executed it. I double checked
it and it says

RUN-TIME ERROR '1004'!

UNABLE TO SET THE HIDDEN PROPERTY OF THE RANGE CLASS

Any Help!!!

"Bob Phillips" wrote:

For Each cell In Range( "AL35:AL609")
cell.Entirerow.Hidden = cell.Value = 0
Next cell

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
...
I have a large area that contains a lot of zero's, I want to be able to

put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Hide Entire Row If Cell = 0

works for me, sure the sheet isn't protected or something

--


Gary


"Sean" wrote in message
...
When I typed in the code I got an error when I executed it. I double checked
it and it says

RUN-TIME ERROR '1004'!

UNABLE TO SET THE HIDDEN PROPERTY OF THE RANGE CLASS

Any Help!!!

"Bob Phillips" wrote:

For Each cell In Range( "AL35:AL609")
cell.Entirerow.Hidden = cell.Value = 0
Next cell

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
...
I have a large area that contains a lot of zero's, I want to be able to

put a
command button out there to HIDE / UNHIDE these rows.

The macro should search column AL35:AL609 this is very specific. If it
finds a 0 in the column it should hide the entire row.

I can add two buttons if needed one to hide and one to show, if needed.

Thanks,

Sean






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
Hide a CELL (not entire row or column) when printing shapiro Excel Discussion (Misc queries) 4 July 2nd 07 01:50 PM
Hide an entire tab. ChuckF Excel Worksheet Functions 3 March 28th 06 05:52 PM
Code to hide Entire row based on criteria ram Excel Programming 7 February 9th 06 09:31 PM
Hide/Delete entire rows based in the content of one cell Clueless Excel Discussion (Misc queries) 2 October 3rd 05 02:40 PM
Hide an entire row - Not working Mark Excel Programming 2 September 14th 05 09:13 PM


All times are GMT +1. The time now is 07:51 AM.

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"