Here is a simple way
Sub CheckForIMR()
If Check_Existence_Of_IMO() = True Then
MsgBox "IMO nr exists"
End If
End Sub
Function Check_Existence_Of_IMO(ByVal sText) As Boolean
Dim rFnd As Range
Dim sText As String
Set rFnd = ActiveSheet.
Range("A:A").Find(What:=sText, LookAt:=xlPart)
If Not rFnd Is Nothing Then
Check_Existence_Of_IMR = True
Else
Check_Existence_Of_IMR = False
End If
End Function
Just replace the range where it needs to be checked Range("A:A")
Cheers
Shasur
http://www.vbadud.blogspot.com