ChristineJ
Well-known Member
- Joined
- May 18, 2009
- Messages
- 761
- Office Version
- 365
- Platform
- Windows
How can the code below be consolidated so that when a cell in B4:B5, B8:B18, B21:B27, B30:B32, B31:B39, B41:B43, and B46:B50 is selected, the word "No" appears in column C in the same row? Thanks!
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$4" Then
Range("C4").Value = "No"
End If
If Target.Address = "$B$5" Then
Range("C5").Value = "No"
End If
If Target.Address = "$B$8" Then
Range("C8").Value = "No"
End If
If Target.Address = "$B$9" Then
Range("C9").Value = "No"
End If
If Target.Address = "$B$10" Then
Range("C10").Value = "No"
End If
If Target.Address = "$B$11" Then
Range("C11").Value = "No"
End If
End Sub