Satheesh9012
New Member
- Joined
- Mar 19, 2021
- Messages
- 41
- Office Version
- 365
- Platform
- Windows
Hi
I need help for one of the codes which is working fine in one form in an excel sheet but not in others, i am trying to hide/unhide certain rows in the sheet based on Yes or no values, if it is Yes a row should be hidden if it is no a row should be hidden so it is working fine in the first form in the excel but when i tried to replicate it in the second form in the same excel sheet in a different row it does not work nor throws an error,
below code i used, i have the range and row changing in 5 other different places in the same sheet
If Range("C32").Value = "Yes" Then
Rows("34:34").EntireRow.Hidden = True
ElseIf Range("C32").Value = "No" Then
Rows("33:33").EntireRow.Hidden = True
Rows("34:34").EntireRow.Hidden = False
End If
I need help for one of the codes which is working fine in one form in an excel sheet but not in others, i am trying to hide/unhide certain rows in the sheet based on Yes or no values, if it is Yes a row should be hidden if it is no a row should be hidden so it is working fine in the first form in the excel but when i tried to replicate it in the second form in the same excel sheet in a different row it does not work nor throws an error,
below code i used, i have the range and row changing in 5 other different places in the same sheet
If Range("C32").Value = "Yes" Then
Rows("34:34").EntireRow.Hidden = True
ElseIf Range("C32").Value = "No" Then
Rows("33:33").EntireRow.Hidden = True
Rows("34:34").EntireRow.Hidden = False
End If