Hi all,

I think there is a simple answer to this one; the user enters data into Column E on Sheet1 and i want my code to display a pop-up box when a cell's value exceeds 500. I've tried the two codes below which i thought would work as Excel didn't highlight any breaks when i wrote the code, but no pop-up box is being generated when values > 500.

Thanks in advance for any suggestions,


Stew




ATTEMPT 1:

Private Sub Threshold_Check2(ByVal Target As range)

Dim cell As range

For Each cell In ActiveSheet.UsedRange.Columns(5).Cells
If cell.Value > 500 Then
MsgBox "Value within 15% of Threshold"
Next cell

End Sub


ATTEMPT 2:


Sub Threshold_Check(ByVal Target As range)


Set Target = range("E1:E150")

For Each cell In range("E1:E150")

If Target.Value > 500# Then
MsgBox "Value within 15% of Threshold"
End If


End Sub