EdwardSurrey
New Member
- Joined
- May 13, 2015
- Messages
- 36
- Office Version
- 365
- Platform
- Windows
Is there a way to have a private sub that runs different macros based on different cell changes?
The below code only executes the HideRows macro when I change the value in C11. It will not execute ClearData macro when I change C10. Is there a way to make it work?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C11")) Is Nothing Then HideRows
Exit Sub
If Not Intersect(Target, Range("C10")) Is Nothing Then ClearData
End Sub
Thanks
The below code only executes the HideRows macro when I change the value in C11. It will not execute ClearData macro when I change C10. Is there a way to make it work?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C11")) Is Nothing Then HideRows
Exit Sub
If Not Intersect(Target, Range("C10")) Is Nothing Then ClearData
End Sub
Thanks