Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
Hiding Specific Rows Based on Values in Other Rows | Excel Worksheet Functions | |||
Hiding a button when hiding rows | Excel Discussion (Misc queries) | |||
Hiding Rows if the linked rows are blank | Excel Discussion (Misc queries) | |||
Copying Rows when hiding other rows | Excel Worksheet Functions |