Sub Check500()
Dim iRow As String
Dim mTxt As String
iRow = 1
mTxt = ""
Do Until ActiveCell.Value = ""
Range("A" & iRow).Select
If ActiveCell.Value > 500 Then
mTxt = mTxt & "A" & iRow & ", "
End If
iRow = iRow + 1
Loop
If Len(mTxt) > 0 Then
MsgBox "WARNING: one of your inputs is over 500" & Chr(10) & mTxt, vbExclamation + vbOKOnlym
End If
End Sub
|