I have a script that looks through an entire column and looks for values between 1 - 9, if it encounters a number it throws a message box if it doesnt it currently throws 10 message boxes, I know this is because the second box is still incide the loop.
I have tried placing it out of the loop but with no success, any pointers would be great to get the Else: MsgBox "All locations correctly entered" to display once!
Sub Scoring()
Dim FindString As String
Dim rng As Range
Dim startVal As Integer, endVal As Integer
startVal = 1
endVal = 9
For i = startVal To endVal
FindString = CStr(i)
With Sheets("Scoring").Range("S:S")
Set rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
MsgBox "There are one or more risks that do not contain the minimum information required for import, please ammend these and try again.", True
Exit For
Else: MsgBox "All locations correctly entered"
End If
End With
Next i
End Sub