how to hide a number of cells based on one cell?
You can do that with the VBE. Right click on sheet tab, go to view code.
Paste this in, then close the editor:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = "no" Then
Range("A4:A15").EntireRow.Hidden = True
Else
Range("A4:A15").EntireRow.Hidden = False
End If
If Range("A19").Value = "no" Then
Range("A20:A100").EntireRow.Hidden = True
Else
Range("A20:A100").EntireRow.Hidden = False
End If
End Sub
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"TG" wrote:
Hello,
How would I be able to hide lets say row 4-15 if A1 had the word no?
Is this even possible? Also, what if i also want to hide rows 20-100 if A19
says "no"?
Thank you in advance,
TG
|