Hi all,
I am very new to this site, so I do hope you can assist me. I am very new to VBA.
I am developing a calculator tool, and need to hide rows and columns, based on the choices of two dropdown boxes. I have attached the spreadsheet for your perusal.
I have the following VBA for hiding and showing the rows, but cannot get the one for the columns to integrate with this.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$8" Then
If Range("C8").Value = "Senior Management" Then
Rows("10:50").EntireRow.Hidden = False
Rows("51:128").EntireRow.Hidden = True
ElseIf Range("C8").Value = "Middle Management" Then
Rows("10:50").EntireRow.Hidden = True
Rows("92:133").EntireRow.Hidden = True
Rows("51:92").EntireRow.Hidden = False
ElseIf Range("C8").Value = "Junior Management" Then
Rows("10:50").EntireRow.Hidden = True
Rows("92:133").EntireRow.Hidden = False
Rows("51:92").EntireRow.Hidden = True
End If
End If
End Sub
But I would like to hide columns ("G"J"), if cell C4 is "Interpretation 1", then hide column F and column("I:J") when cell C4 is Interpretation2" etc etc. I have attached the sheet for your attention. Please can you help?
Bookmarks