Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #2   Report Post  
ScottO
 
Posts: n/a
Default

It shouldn't be too hard to construct the "test formula", but I think that
the starting point is to identify what the tests are going to be.

I've got a few to propose:
1. Test that it's a text string
2. Test for the position of "@" in the text string (A)
3. Test for the position of "." in the text string (B)
4. Test that neither A or B are NA#
5. Test that there is text before A
6. Test that there is text between A and B
7. Test that there is text after B

There's probably some others that I haven't thought of (and maybe some of
mine are redundant).
Given the number of tests, it's probably worthwhile making one formula for
each test and then getting the answer with a summary formula.

Assuming the eddress is in A1, and the formulas go in cells B1, C1, etc.,
the try these:
1. B1 =IsText(A1)
2. C1 =Find("@",A1)
3. D1 =Find(".",A1)
4. E1 =SUM(C1:D1)
5. F1 =C11
6. G1 =D1-C11
7. H1 =Len(A1)D1

The summary formula (in I1) could then be something like =AND(B1:H1), where
a result of False means that at least one of the tests has failed.

It's a bit long winded, and may need some de-bugging, but it should get the
job done.
Rgds,
ScottO


"BethP" wrote in message
...
| Is there an easy formula to tell you if an email address is formatted
| correctly, with ? I don't even need to know more than that
| (such as valid domains, etc.) for now.
|
| My original thought was just a basic IF statement to drop in to the next
| column that tells me if the cell is formatted correctly. But I don't know
| how to look for text in a particular sequence or format.
|
| Any ideas for something like this, or better? Thanks!
| (You all always have the best answers!)
|
| -bethp
|
| (Inadvertently x-posted to Excel Programming too; sorry for the dupe
request!)


  #3   Report Post  
BethP
 
Posts: n/a
Default

Thank you Scott! This got me most of the way there, though it isn't appear
foolproof yet. (Gives me something to play with to test further though)

So far, gauging the validity of the address based on whether there is a dot
and where it is isn't panning out. We have several "
addresses. The text-placement tests can fail in this case, and an incomplete
email address such as "john.doe@company" will pass.

I suppose putting in a test to ensure there are no spaces in the address
would help too, preventing "john " from passing.

I can't wait until we invest in a list server to manage all of this! ;-)

Thanks again. This gives me something to start with!
-bethp

"ScottO" wrote:


  #5   Report Post  
BethP
 
Posts: n/a
Default

Hi Scott,
Thanks again. With your help and a couple other posts in this board, I was
able to hack this together! Here is what I have:

1. Test that it's a text string
ISTEXT(A2)
2. Test for the position of "@" in the text string (A)
FIND("@",A2)
3. Count occurrences of "@" in test string (nullify if <1)
AND((SUMPRODUCT(--(LEN(A2)-LEN(SUBSTITUTE(A2,"@","")))))=1)
4. Test for the position of "." in the text string (B)
FIND(".",A2,C2+1)
5. Test that neither A or B are NA#
SUM(C2:E2)
6. Test that there is text before A
C21
7. Test that there is text between A and B
E2-C21
8. Test that there is text after B
LEN(A2)E2
9.Does not contain a space
ISERR(NOT(FIND(" ",A2)))
a result of False means that at least one of the tests has failed
IF(ISERR(AND(B2:J2)),"",(AND(B2:J2)))



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Validating email address formatting

Hi,

Could you please explain how to enter your results within a cell to validate
for inputting correct address. I would really appreciate an email response,
candid, I know but I am really stuck on this one.

Kind Regards,

Gerry

"BethP" wrote:

Hi Scott,
Thanks again. With your help and a couple other posts in this board, I was
able to hack this together! Here is what I have:

1. Test that it's a text string
ISTEXT(A2)
2. Test for the position of "@" in the text string (A)
FIND("@",A2)
3. Count occurrences of "@" in test string (nullify if <1)
AND((SUMPRODUCT(--(LEN(A2)-LEN(SUBSTITUTE(A2,"@","")))))=1)
4. Test for the position of "." in the text string (B)
FIND(".",A2,C2+1)
5. Test that neither A or B are NA#
SUM(C2:E2)
6. Test that there is text before A
C21
7. Test that there is text between A and B
E2-C21
8. Test that there is text after B
LEN(A2)E2
9.Does not contain a space
ISERR(NOT(FIND(" ",A2)))
a result of False means that at least one of the tests has failed
IF(ISERR(AND(B2:J2)),"",(AND(B2:J2)))

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some cells do not recognize email address Coachstan New Users to Excel 3 April 25th 05 01:18 AM
email address hyperlink Ulti Excel Worksheet Functions 1 March 1st 05 03:18 AM
Help me Please!! Need hyperlinks to show actual email address! dustin New Users to Excel 1 January 13th 05 08:59 PM
how do I make make my hyperlinks show the email address they are . Dustin Excel Discussion (Misc queries) 0 January 13th 05 01:39 AM
Shut off email address from linking to email program? Java Jake Excel Worksheet Functions 6 December 31st 04 04:05 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"