Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Verify Phone Number

~~~WOW, this accidenlty went to Access Newsgroup. Must not have been paying
attention this morning!!~~~~

Is there a method for verifying first if the data entered is a valid number,
then if it's a valid phone number? By Valid phone number I mean is it 10
digits without any formatting EXAMPLE ##########?

I think I can use IsNumeric for the first part, but can I pass a format to
IsNumeric, if so how?

Thank You


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Verify Phone Number

For a start:

Function IsPhone(n) As Boolean
IsPhone = False
If Application.IsNumber(n) Then
If Len(n.Value) = 10 Then
IsPhone = True
End If
End If
End Function

--
Gary''s Student


"Striker" wrote:

~~~WOW, this accidenlty went to Access Newsgroup. Must not have been paying
attention this morning!!~~~~

Is there a method for verifying first if the data entered is a valid number,
then if it's a valid phone number? By Valid phone number I mean is it 10
digits without any formatting EXAMPLE ##########?

I think I can use IsNumeric for the first part, but can I pass a format to
IsNumeric, if so how?

Thank You



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
How to format the phone number Michelle Excel Worksheet Functions 2 March 5th 10 11:49 PM
Convert number to phone number smartgal Excel Discussion (Misc queries) 2 October 16th 08 11:56 PM
Verify Textbox Information is a Number and Not Text pallaver Excel Discussion (Misc queries) 6 July 17th 08 09:00 AM
Phone number not nrodADAA Excel Discussion (Misc queries) 2 September 4th 07 09:42 PM
Phone number Lisa Excel Discussion (Misc queries) 3 May 10th 05 10:34 PM


All times are GMT +1. The time now is 02:40 AM.

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

About Us

"It's about Microsoft Excel"