Hello,
I have a sheet where users enter inputs, and I want the sheet to clear all inputs when they change the account name. The code for this is below, and was successfully implemented:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C4")) Is Nothing Then
Range("C8").Value = "No"
Range("A12").Value = "No"
Range("C12:K12").ClearContents
Range("C13").ClearContents
Range("C15").ClearContents
Range("C17:C18").ClearContents
Range("C20:C21").ClearContents
Range("D20:I20").ClearContents
Range("D54").ClearContents
Range("A20").Value = "No"
Range("C19").Value = 2
Range("A53").Value = "Select Ticket Type"
Range("B57:B72").Value = "No"
Range("C57:J72").Value = 0
End If
End Sub
However, I want a similar thing (clear different cells) to happen when the user makes changes to cell A53. I've tried copying/pasting the above macro into the same sub (after modifying) and the effect did not take. I also tried creating a separate subroutine with A53 substituted for C4 in line 3 with no effect. In both scenarios, the original code still works.
In essence, how can I make sure that both cell-change events trigger the desired routines?
Thanks,
I have a sheet where users enter inputs, and I want the sheet to clear all inputs when they change the account name. The code for this is below, and was successfully implemented:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C4")) Is Nothing Then
Range("C8").Value = "No"
Range("A12").Value = "No"
Range("C12:K12").ClearContents
Range("C13").ClearContents
Range("C15").ClearContents
Range("C17:C18").ClearContents
Range("C20:C21").ClearContents
Range("D20:I20").ClearContents
Range("D54").ClearContents
Range("A20").Value = "No"
Range("C19").Value = 2
Range("A53").Value = "Select Ticket Type"
Range("B57:B72").Value = "No"
Range("C57:J72").Value = 0
End If
End Sub
However, I want a similar thing (clear different cells) to happen when the user makes changes to cell A53. I've tried copying/pasting the above macro into the same sub (after modifying) and the effect did not take. I also tried creating a separate subroutine with A53 substituted for C4 in line 3 with no effect. In both scenarios, the original code still works.
In essence, how can I make sure that both cell-change events trigger the desired routines?
Thanks,