WentzelN94
New Member
- Joined
- Mar 7, 2023
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hi
I used the following code to automatically hide/unhide rows based on conditions but do not have the skills to also apply this to columns.
So what I need is that I am using column C to T for my data. In row 210 I have a formula that if D5 is empty it should return a False. If all shells from D5 to T5 is empty then only column D should show. When D5 is populated with a value then column E should unhide and so on until D5 to T5 is populated and all columns is unhided.
Thank you
I used the following code to automatically hide/unhide rows based on conditions but do not have the skills to also apply this to columns.
VBA Code:
Public Sub Worksheet_Change(ByVal Target As Range)
Dim r As Long
Dim m As Long
If Not Intersect(Me.Range("B7:B200"), Target) Is Nothing Then
Application.ScreenUpdating = False
Application.EnableEvents = False
Me.Range("AZ:AZ").EntireRow.Hidden = False
m = Range("AZ" & Me.Rows.Count).End(xlUp).Row
For r = 12 To m
If Range("AZ" & r).Value = False Then
Range("AZ" & r).EntireRow.Hidden = True
End If
Next r
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub
So what I need is that I am using column C to T for my data. In row 210 I have a formula that if D5 is empty it should return a False. If all shells from D5 to T5 is empty then only column D should show. When D5 is populated with a value then column E should unhide and so on until D5 to T5 is populated and all columns is unhided.
Thank you
Last edited by a moderator: