Hide Rows on Sheet 2 based off dropdown with data validator on Sheet 1 - but data for dropdown is always hidden on Sheet 2

resourceenv

New Member
Joined
Apr 14, 2022
Messages
2
Hi - I am adding a dropdown to a work excel and inherited someone elses coding and formats. I need help hiding rows on sheet "Information Update" if a dropdown on sheet "Request for Proposal" equals the various options. See what i have tried below - I essentially only want those rows showing if PLA is selected.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = ("C36") Then
If Target.Text = "PLA" Then
With Sheets("2-Information Update")
Rows("68:78").EntireRow.Hidden = False
ElseIf Target.Text = "Prevailing Wage" Then
Rows("68:78").EntireRow.Hidden = True
ElseIf Target.Text = "Non-Prevailing" Then
Rows("68:78").EntireRow.Hidden = True
ElseIf Target.Text = "Davis Bacon" Then
Rows("68:78").EntireRow.Hidden = True
ElseIf Target.Text = "" Then
Rows("68:78").EntireRow.Hidden = True

End If
End If
End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi & welcome to MrExcel.
How about
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.CountLarge > 1 Then Exit Sub
   If Target.Address(0, 0) = "C36" Then
      Sheets("2-Information Update").Rows("68:78").Hidden = Target.Value <> "PLA"
   End If
End Sub
 
Upvote 0
Hi & welcome to MrExcel.
How about
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.CountLarge > 1 Then Exit Sub
   If Target.Address(0, 0) = "C36" Then
      Sheets("2-Information Update").Rows("68:78").Hidden = Target.Value <> "PLA"
   End If
End Sub
Thank you ! Can you explain to me what we did there

Really appreciate it
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,198
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top