yazanibrahim1984
New Member
- Joined
- May 16, 2019
- Messages
- 10
Hello,
I'm super noob/beginner with macros and I'm writing a code to change the value for cells in column E to 0.00 if cells in column K has "Yes". Here's what I have:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$K$" And Target.Value = "Yes" Then
Range("$E$").Value = "0.00"
End If
End Sub
But this doesn't work because:
1. it's only working on one cell
2. if I remove the word "Yes" from the cell in column K, the value remains 0.00 in column E and I cannot UNDO/Ctrl+Z to go back to the original value.
Any help/suggestion is appreciated.
I'm super noob/beginner with macros and I'm writing a code to change the value for cells in column E to 0.00 if cells in column K has "Yes". Here's what I have:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$K$" And Target.Value = "Yes" Then
Range("$E$").Value = "0.00"
End If
End Sub
But this doesn't work because:
1. it's only working on one cell
2. if I remove the word "Yes" from the cell in column K, the value remains 0.00 in column E and I cannot UNDO/Ctrl+Z to go back to the original value.
Any help/suggestion is appreciated.