Currently I'm working with a data table that I've built in True/False IF function in columns D and K. This allows the user to have 2 text boxes at the top of the table, which filter the table based on user entry.
I would like VBA to automatically remove the "false" rows which come back on value. Currently this is the VBA code I'm working with, which only is working for column K. I would like to have both of the rows work at once. I appreciate any help!
Matt
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range("D7:D200")
If c.Value = False Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
Dim d As Range
For Each d In Range("K7:K200")
If d.Value = False Then
d.EntireRow.Hidden = True
Else
d.EntireRow.Hidden = False
End If
Next d
End Sub
I would like VBA to automatically remove the "false" rows which come back on value. Currently this is the VBA code I'm working with, which only is working for column K. I would like to have both of the rows work at once. I appreciate any help!
Matt
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range("D7:D200")
If c.Value = False Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
Dim d As Range
For Each d In Range("K7:K200")
If d.Value = False Then
d.EntireRow.Hidden = True
Else
d.EntireRow.Hidden = False
End If
Next d
End Sub