Hello - I badly need some help. Can someone help me please?
The below macro works only if there is a manual action on cell C5. I am keen to initiate the below macro, if cell C5 automatically changes because of a formula in cell C5. Any feedback on this would be much appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)ActiveSheet.ActivateIf Not Application.Intersect(Range("C5"), Range(Target.Address)) Is Nothing Then Select Case Target.Value Case Is = "Canada": Rows("19:25").EntireRow.Hidden = True Rows("7:18").EntireRow.Hidden = False Case Is = "India": Rows("19:25").EntireRow.Hidden = False Rows("7:18").EntireRow.Hidden = True End SelectEnd IfEnd Sub
The below macro works only if there is a manual action on cell C5. I am keen to initiate the below macro, if cell C5 automatically changes because of a formula in cell C5. Any feedback on this would be much appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)ActiveSheet.ActivateIf Not Application.Intersect(Range("C5"), Range(Target.Address)) Is Nothing Then Select Case Target.Value Case Is = "Canada": Rows("19:25").EntireRow.Hidden = True Rows("7:18").EntireRow.Hidden = False Case Is = "India": Rows("19:25").EntireRow.Hidden = False Rows("7:18").EntireRow.Hidden = True End SelectEnd IfEnd Sub