tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 399
Hi there,
I am trying to write a code which hides/unhides rows depending on whether Yes or No is selected. The first part of my code works fine however, I am having trouble with the second part. How do I unhide two ranges of rows? I would prefer not to write two lines of code because it causes a stutter affect.
If Range("Plus_YN_2") = "NO" Then
Rows("82:101").EntireRow.Hidden = True
End If
If Range("Plus_YN_2") = "YES" Then
Rows("82:90,100:101").EntireRow.Hidden = False
End If
Thanks very much!
I am trying to write a code which hides/unhides rows depending on whether Yes or No is selected. The first part of my code works fine however, I am having trouble with the second part. How do I unhide two ranges of rows? I would prefer not to write two lines of code because it causes a stutter affect.
If Range("Plus_YN_2") = "NO" Then
Rows("82:101").EntireRow.Hidden = True
End If
If Range("Plus_YN_2") = "YES" Then
Rows("82:90,100:101").EntireRow.Hidden = False
End If
Thanks very much!