Can someone please help? I have a sheet and am trying to add a VBA code that triggers a pop up message if a person enters a number in cell E5 that is less than 0.5. I have the following code entered in the Microsoft Visual Basic for Applications:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("$E$5").Value < 0.5 Then MsgBox "This is wrong"
End Sub
It seems to be working, as when I enter a value in E5 that is less than 0.5 that alert comes up. However, the alert comes up for every single cell in the spreadsheet when I enter a value less than 0.5. I thought I had restricted it to cell E5 in the coding.
Could someone please help me and let me know what I am doing wrong? THANK YOU!!!!
Bookmarks