Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you hide a row if a certain cell equals zero?
Hi
I'm trying to create a shipping report for work, based on another spreadsheet. I need to know how to hide and entire row once all units have shipped. As it is now, the report just lists "units due" as "0". Is there a formula that will hide that row when the "units due" cell is "0". Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you hide a row if a certain cell equals zero?
This code has two functions. First, it will unhide any rows that you may
have previously hidden that no longer contain a '0' value... and the second part hides all the rows that do contain '0' values. Sub Your_name_here Dim i As Long With Application .ScreenUpdating = False Sheets("Sheet Name Here").Select Range("Range of cells you are checking - the column").Select For i = Selection.Cells.Count To 1 Step -1 If Selection.Cells(i) < 0 Then Selection.Rows(i).EntireRow.Hidden = False End If Next i Sheets("Sheet Name Here").Select Range("Range of cells you are checking").Select For i = Selection.Cells.Count To 1 Step -1 If Selection.Cells(i) = 0 Then Selection.Rows(i).EntireRow.Hidden = True End If Next i end with end sub "msqueenjessica" wrote: Hi I'm trying to create a shipping report for work, based on another spreadsheet. I need to know how to hide and entire row once all units have shipped. As it is now, the report just lists "units due" as "0". Is there a formula that will hide that row when the "units due" cell is "0". Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you hide a row if a certain cell equals zero?
You may want to apply Data|Filter|autofilter to that range (or just that
column). Then filter on the non-zero values (custom|does not equal|0) msqueenjessica wrote: Hi I'm trying to create a shipping report for work, based on another spreadsheet. I need to know how to hide and entire row once all units have shipped. As it is now, the report just lists "units due" as "0". Is there a formula that will hide that row when the "units due" cell is "0". Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If a cell equals _, at the next row that equals _, return value fr | Excel Worksheet Functions | |||
If cell is left blank, or equals zero, then cell equals a different cell | Excel Discussion (Misc queries) | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) | |||
if a:a (range) equals january and c:c equals gas then add g:g ($) | Excel Worksheet Functions | |||
custom filter does not work when selecting 'equals' X AND 'equals' | Excel Discussion (Misc queries) |