B
bernd
HI,
I found this code in another thread and edited it for the range. The
code works fine if nothing is in the cell. But in my cells there is a
formula. The results of these formulas (value of a cell on another
sheet). Sometime these values era simply nothing, but the code doesn't
hide the rows. It onlys hides the rows if everything is cleared. How
can this code be edited, so that the rows witk cells that have no
value (like "") ere hidden?
Sub HideRows()
Sheets("Shortlist").Select
Range("J8:eindprioriteit").EntireRow.Hidden = False
On Error Resume Next
Set rng = Range("J7:eindprioriteit").SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Hidden = True
End If
End Sub
I found this code in another thread and edited it for the range. The
code works fine if nothing is in the cell. But in my cells there is a
formula. The results of these formulas (value of a cell on another
sheet). Sometime these values era simply nothing, but the code doesn't
hide the rows. It onlys hides the rows if everything is cleared. How
can this code be edited, so that the rows witk cells that have no
value (like "") ere hidden?
Sub HideRows()
Sheets("Shortlist").Select
Range("J8:eindprioriteit").EntireRow.Hidden = False
On Error Resume Next
Set rng = Range("J7:eindprioriteit").SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Hidden = True
End If
End Sub