View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Greendistantstar Greendistantstar is offline
external usenet poster
 
Posts: 2
Default Cell Formats & Hiding

Gary''s Student wrote:
Give this a try:

Sub HideZeroRows()
Dim r As Range, nLastRow As Long, r2 As Range
Dim n1 As Long, n2 As Long
Dim f As WorksheetFunction
Set f = Application.WorksheetFunction
Set r = ActiveSheet.UsedRange
nLastRow = r.Rows.Count + r.Row - 1
Cells.EntireRow.Hidden = False
For i = 1 To nLastRow
Set r2 = Rows(i)
n1 = f.CountIf(r2, 0) + f.CountIf(r2, "")
If n1 = Columns.Count Then
Rows(i).Hidden = True
End If
Next
End Sub


Thanks. I'll trying running this later today.

GDS

"Let's roll!"