Verify email

S

Sandee

I have names and email addresses in excel worksheet...is there a way to
validate these addresses
 
R

Ron de Bruin

Hi Sandee

Do you want this?

You can check for the @ and the . character in each mail address

Sub test()
' J.E suggestion "?*@?*.?*" instead of *@*
For Each mycell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If mycell.Value Like "?*@?*.?*" Then
'do nothing
Else
MsgBox "Wrong E-mail address in " & mycell.Address
End If
Next
End Sub
 
Top