Hiding Cells Automatically
Hi Bryan
try the following macro
Private Sub hide_row()
Dim r As Long
Application.ScreenUpdating = False
With Worksheets("Sheet1")
For r = .UsedRange.Rows(.UsedRange.Rows.Count).Row To 1 Step -1
If Application.CountA(Range(Cells(r,"C"),Cells(r,"O") )) = 0
Then
.Rows(r).Hidden = True
End If
Next
End With
Application.ScreenUpdating = True
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
Hartsell wrote:
Hello,
I have data in rows 6 through 100. To make viewing and printing easy
i would like to hide all the rows that have a zero value in columns C
through O. I have never had any luck with macros but I would be
willing to give it another shot if someone could help me write the
code.
It is possible that data can be updated in another worksheet which
would update a value referenced in the macro. Bacause of that this
would have to be an automatic process.
Thanks in advance
Bryan
Bryan
|