So I am trying to use the answer to a drop down to hide a range of rows if a certain answer is selected. Here is the code Ive pieced together but it may not be right at all.. Help please?
Private Sub Worksheet_Change(ByVal Target As range)
Dim what, whatrange, hold1, hold2, act, quotetype
Dim laboronly As String
hold1 = Worksheets(".").[G18].Value ' First row of range
hold2 = Worksheets(".").[G19].Value ' Last row of range
act = "A" & (hold1 - 3)
what = hold1 & ":" & hold2
quotetype = Worksheets("L&M").[E11].Value 'Cell with dropdown list
laboronly = "Labor ONLY" 'Value of dropdown that will cause above range to hide
If quotetype = laboronly Then
range(what).EntireRow.Hidden = True
ElseIf quotetype <> laboronly Then
range(what).EntireRow.Hidden = False
End If
End Sub
Bookmarks