ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Verify email (https://www.excelbanter.com/excel-discussion-misc-queries/12279-verify-email.html)

Sandee

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

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(xlCellTypeConstant s)
If mycell.Value Like "?*@?*.?*" Then
'do nothing
Else
MsgBox "Wrong E-mail address in " & mycell.Address
End If
Next
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Sandee" wrote in message ...
I have names and email addresses in excel worksheet...is there a way to
validate these addresses





All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com