I need that when a cell says true or false certain rows and/or columns are hide/unhide. Let me explain:
If U70= FALSE rows 72-439, 3-4, 39-40 and columns L-S are all hidden
and
rows 1-2, 41-71 are all showing (Unhidden)
BUT, if U70= TRUE and cell B74 is BLANK... rules when false (bolded area above) still apply, but in addition, row 72 is now also showing (unhidden)
BUT, if U70= TRUE and cell B74 if FILLED... rows 1-2, 41-72, 440-4509 are ALL HIDDEN
and
rows 3-4, 39-40, 74, 439 and columns L-S ARE ALL SHOWING (UNHIDDEN).. ALSO, ROWS 75-438 IS UNHIDDEN AS THAT ROWS B COLUMN IS FILLED.
If someone could help me with this... IT WOULD MORE THAN GREATLY APPRECIATED... THANK YOU in advance to EVERYONE who decides to help me!!!
CONDITIONAL hidden/unhidden rows/columns.. HELP!?
Responses (1)
The following version may speed it up slightly, but basically, the macro has to do a lot of work.
Sub HideUnhide()
Dim r As Long
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Range("A1:A" & Rows.Count).EntireRow.Hidden = False
If Range("U70").Value = False Then
Range("L1:S1").EntireColumn.Hidden = True
Range("A3:A4,A39:A40,A72:A439").EntireRow.Hidden = True
ElseIf Range("B74").Value = "" Then
Range("L1:S1").EntireColumn.Hidden = True
Range("A3:A4,A39:A40,A73:A439").EntireRow.Hidden = True
Else
Range("L1:S1").EntireColumn.Hidden = False
Range("A1:A2,A41:A72,A440:A4509").EntireRow.Hidden = True
For r = 75 To 438
If Range("B" & r).Value = "" Then
Range("B" & r).EntireRow.Hidden = True
End If
Next r
End If
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub