buttercup116
New Member
- Joined
- Jan 10, 2013
- Messages
- 9
I have an intense worksheet filled with IF formulas.
most of them are set up like this: =IF(ISBLANK(A1),"",A1)
A cell with "" as the answer to the IF statement returns no value.
So, here is my dilema...
When a cell in column D, specifically in the range of D67:D350, returns blank ("") or no value, I would like the row to hide.
This is the nonfunctional code I have in the worksheet:
<code>
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range("D97:D350")
If IsBLANK(c.Value) Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
End Sub
</code>
Right now "" is hilighted in yellow as an error. I would appreciate any and all help.
most of them are set up like this: =IF(ISBLANK(A1),"",A1)
A cell with "" as the answer to the IF statement returns no value.
So, here is my dilema...
When a cell in column D, specifically in the range of D67:D350, returns blank ("") or no value, I would like the row to hide.
This is the nonfunctional code I have in the worksheet:
<code>
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range("D97:D350")
If IsBLANK(c.Value) Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
End Sub
</code>
Right now "" is hilighted in yellow as an error. I would appreciate any and all help.