Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like to hide a row if all cells in another range are blank. Example:
If A4:A8 are all blank, then hide row A3. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This can easily be modified for any range and row:
Sub dford() If Application.WorksheetFunction.CountA(Range("A4:A8" )) 0 Then Else Rows(3).EntireRow.Hidden = True End If End Sub -- Gary''s Student gsnu200703 "dford" wrote: I would like to hide a row if all cells in another range are blank. Example: If A4:A8 are all blank, then hide row A3. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This works fine. But now I am trying to add it to an existig macro. It skips
over the code you suggested earlier. Below is the macro I am trying to use. Sub HideRows() ' ' HideRows Macro ' Macro recorded 2/2/2007 by Doug ' ' ActiveSheet.Unprotect If Application.WorksheetFunction.CountA(Range("A39:A4 8")) 0 Then Else Rows(38).EntireRow.Hidden = True End If Application.Goto Range("BM4"), True Range("BP4:BP333").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="<0", Operator:=xlAnd Range("A1").Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub "Gary''s Student" wrote: This can easily be modified for any range and row: Sub dford() If Application.WorksheetFunction.CountA(Range("A4:A8" )) 0 Then Else Rows(3).EntireRow.Hidden = True End If End Sub -- Gary''s Student gsnu200703 "dford" wrote: I would like to hide a row if all cells in another range are blank. Example: If A4:A8 are all blank, then hide row A3. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
clear range of cells if another becomes blank | Excel Worksheet Functions | |||
Sorting and Eliminating Blank Cells in Formula range | Excel Worksheet Functions | |||
Simple Sumproduct of 2 Columns, with some blank cells in range | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Counting empty cells within a range of cells | New Users to Excel |