#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Hiding Rows

I have a cell that has 0 for a total and I want to hide the entire row that
cell is in. Expamle: if cell A1 is '0', I want to hide row 1. Any ideas
how I can do that. I am using excel 2003.
Thanks
Graham

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Hiding Rows

Apply autofilter to that column. From the filter drop-down choose
Custom and in the pop-up panel select Does not equal and then put 0
(zero) in the other box, then OK. This will hide those rows that
contain a zero in that column.

Hope this helps.

Pete

On Jan 13, 12:50*pm, "Graham Moore" wrote:
I have a cell that has 0 for a total and I want to hide the entire row that
cell is in. *Expamle: if cell A1 is '0', I want to hide row 1. *Any ideas
how I can do that. *I am using excel 2003.
Thanks
Graham


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Hiding Rows

Hi,

Select A1 then
data|Filter|Autofilter

click the down arrow and rom the dropdown select 'Does not equal'
enter 0 (zero)

OK

Mike

"Graham Moore" wrote:

I have a cell that has 0 for a total and I want to hide the entire row that
cell is in. Expamle: if cell A1 is '0', I want to hide row 1. Any ideas
how I can do that. I am using excel 2003.
Thanks
Graham


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Location: Bakersfield, CA
Posts: 45
Send a message via Skype™ to JBeaucaire[_85_]
Default Hiding Rows

Here's a macro that will do it, you can adjust it:

==========
Sub HideRows()

Application.ScreenUpdating = False
Application.EnableEvents = False

Dim cell As Range

For Each cell In Worksheets(1).Range("A1:A100")
cell.EntireRow.Hidden = Len(cell.Text) = 0
Next cell

Application.EnableEvents = True
End Sub
==========
This macro runs on the first sheet, regardless of what it's called. Change
the numeral 1 to whatever sheet number (in order) you wish to run it on. And
also, adjust the A1:A100 to as many or as few rows as you want.

Paste the code above into a normal VB Module.

Press Alt-F11
Click InsertModule
Paste in the code
Press Alt-Q
Save your sheet

Run your new macro! Is this something you can work with?

--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Graham Moore" wrote:

I have a cell that has 0 for a total and I want to hide the entire row that
cell is in. Expamle: if cell A1 is '0', I want to hide row 1. Any ideas
how I can do that. I am using excel 2003.
Thanks
Graham


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,117
Default Hiding Rows

correction - JBeaucaire forgot to turn back on
screenupdating..........
==========
Sub HideRows()


Application.ScreenUpdating = False
Application.EnableEvents = False


Dim cell As Range


For Each cell In Worksheets(1).Range("A1:A100")
cell.EntireRow.Hidden = Len(cell.Text) = 0
Next cell

Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
==========
:)
susan


On Jan 13, 8:17*am, JBeaucaire wrote:
Here's a macro that will do it, you can adjust it:

==========
Sub HideRows()

Application.ScreenUpdating = False
Application.EnableEvents = False

* * Dim cell As Range

* * For Each cell In Worksheets(1).Range("A1:A100")
* * * * cell.EntireRow.Hidden = Len(cell.Text) = 0
* * Next cell

Application.EnableEvents = True
End Sub
==========
This macro runs on the first sheet, regardless of what it's called. Change
the numeral 1 to whatever sheet number *(in order) you wish to run it on. And
also, adjust the A1:A100 to as many or as few rows as you want.

Paste the code above into a normal VB Module.

Press Alt-F11
Click InsertModule
Paste in the code
Press Alt-Q
Save your sheet

Run your new macro! *Is this something you can work with?

--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.



"Graham Moore" wrote:
I have a cell that has 0 for a total and I want to hide the entire row that
cell is in. *Expamle: if cell A1 is '0', I want to hide row 1. *Any ideas
how I can do that. *I am using excel 2003.
Thanks
Graham- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Location: Bakersfield, CA
Posts: 45
Send a message via Skype™ to JBeaucaire[_85_]
Default Hiding Rows

The devil is in the details. Thank you Susan. Got my vote and corrected my
archived code.

--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Susan" wrote:

correction - JBeaucaire forgot to turn back on
screenupdating....

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
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Copying Rows when hiding other rows Neutron1871 Excel Worksheet Functions 2 November 3rd 04 11:38 PM


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

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

About Us

"It's about Microsoft Excel"