#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default phone number format

Dear Experts,
I have one column with 4424 rows represents customer's phone numbers
as follow.
971-4-5735403
How can I know if the last part (5735403) contains seven digits only?
Many thanks in advance
Omar
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default phone number format

=IF(AND(LEFT(RIGHT(A1,7),1)<"-",ISNUMBER(--RIGHT(A1,7))),"OK","Problem")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Omar" wrote in message
...
Dear Experts,
I have one column with 4424 rows represents customer's phone numbers
as follow.
971-4-5735403
How can I know if the last part (5735403) contains seven digits only?
Many thanks in advance
Omar



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default phone number format

Omar,

If the format is consistent with 2 "-" as delimeters then this formula

=IF(LEN(MID(A1,FIND("-",A1,FIND("-",A1,1)+1)+1,999))=7,"Correct
Length","Incorrect")

dragged down will tell you.

Mike

"Omar" wrote:

Dear Experts,
I have one column with 4424 rows represents customer's phone numbers
as follow.
971-4-5735403
How can I know if the last part (5735403) contains seven digits only?
Many thanks in advance
Omar

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default phone number format

Put this in the first row of an unused column and copy down as far as you
like...

=IF(A1="","",IF(ISNUMBER(--RIGHT(SUBSTITUTE(A1,"-","x"),7)),IF(ISNUMBER(--RIGHT(SUBSTITUTE(A1,"-","x"),8)),"No","Yes"),"No"))

Rick


"Omar" wrote in message
...
Dear Experts,
I have one column with 4424 rows represents customer's phone numbers
as follow.
971-4-5735403
How can I know if the last part (5735403) contains seven digits only?
Many thanks in advance
Omar


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
Changing Phone number format Noncentz303 Excel Worksheet Functions 2 May 2nd 07 05:42 PM
Format change of phone number helpjim Excel Discussion (Misc queries) 7 May 18th 06 07:34 PM
How to format a phone number in Excel tfanatik Excel Discussion (Misc queries) 4 May 12th 06 04:53 PM
Join three columns containing phone number and format as (000) 000 Sharon Barr Excel Discussion (Misc queries) 5 March 10th 06 11:37 PM
how do I add phone number format as a permanent custom format? frustratedagain Excel Discussion (Misc queries) 3 February 4th 06 04:52 AM


All times are GMT +1. The time now is 05:08 PM.

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"