Sub Exemplo()
Dim lRow As Long
lRow = GetMatchRow("Felipe", Columns("A"))
If lRow > 0 Then
MsgBox "Registro já existe na coluna A."
Else
MsgBox "Registro não existe na coluna A."
End If
End Sub
Public Function GetMatchRow(searchValue As Variant, _
searchArray As Variant) As Long
'This function returns 0 if searchValue is not on searchArray.
Dim element As Long
On Error Resume Next
element = WorksheetFunction.Match(CDbl(searchValue), searchArray, 0)
If element = 0 Then element = WorksheetFunction.Match(CStr(searchValue), searchArray, 0)
GetMatchRow = element
End Function
Felipe Costa Gualberto - http://www.ambienteoffice.com.br