ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Validate Email address entry (https://www.excelbanter.com/excel-discussion-misc-queries/144543-validate-email-address-entry.html)

Rayasiom

Validate Email address entry
 
Hi All,

How can I validate data entry into a spreadsheet for a specific cell where
an email address is typed into? One of the common errors my data capturers do
is using a comma instead of a full-stop.
Thanks

Jim Cone

Validate Email address entry
 


This may come close...
Right-click the sheet tab, select View Code and paste the following
code in the big white window...
'--
Private Sub Worksheet_Change(ByVal Target As Range)
If Target(1, 1).Address = Me.Range("C5").Address Then
If InStr(1, Target(1, 1).Value, ",", vbTextCompare) 0 Then
MsgBox "Don't do that. "
Application.Undo
End If
End If
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Rayasiom"
wrote in message
Hi All,
How can I validate data entry into a spreadsheet for a specific cell where
an email address is typed into? One of the common errors my data capturers do
is using a comma instead of a full-stop.
Thanks

Rayasiom

Validate Email address entry
 
Hi Jim,
Thanks - it does work.

"Jim Cone" wrote:



This may come close...
Right-click the sheet tab, select View Code and paste the following
code in the big white window...
'--
Private Sub Worksheet_Change(ByVal Target As Range)
If Target(1, 1).Address = Me.Range("C5").Address Then
If InStr(1, Target(1, 1).Value, ",", vbTextCompare) 0 Then
MsgBox "Don't do that. "
Application.Undo
End If
End If
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Rayasiom"
wrote in message
Hi All,
How can I validate data entry into a spreadsheet for a specific cell where
an email address is typed into? One of the common errors my data capturers do
is using a comma instead of a full-stop.
Thanks



All times are GMT +1. The time now is 09:11 AM.

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