Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2013, 09:59 AM
hommi16 hommi16 is offline Extracting a phone number from a string that contains text and numbers. Windows 7 32bit Extracting a phone number from a string that contains text and numbers. Office 2007
Novice
Extracting a phone number from a string that contains text and numbers.
 
Join Date: Jun 2013
Posts: 1
hommi16 is on a distinguished road
Default Extracting a phone number from a string that contains text and numbers.

Hi everyone,



I have a whole bunch of cells which contain names, addresses and phone numbers. Each row is varying length and I'm trying to just extract the phone number.

The phone numbers are in this format: (xxx)xxx-xxxx so there are no spaces.

Any help would be appreciated.

Reply With Quote
  #2  
Old 06-05-2013, 11:55 AM
Serge 007's Avatar
Serge 007 Serge 007 is offline Extracting a phone number from a string that contains text and numbers. Windows XP Extracting a phone number from a string that contains text and numbers. Office 2010 32bit
Novice
 
Join Date: Jun 2013
Posts: 6
Serge 007 is on a distinguished road
Default

If still brackets in the text aren't present also number always from 13 signs, it is possible so:
Code:
=mid(a1,find("(",a1),13)
Otherwise - give a file example
Reply With Quote
  #3  
Old 06-05-2013, 09:19 PM
BobBridges's Avatar
BobBridges BobBridges is offline Extracting a phone number from a string that contains text and numbers. Windows 7 64bit Extracting a phone number from a string that contains text and numbers. Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 685
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

If the only place a left paren is to be found is at the beginning of a 13-byte phone number, then I agree with Serge's solution. I tend to distrust the claim that the input data will always be valid, so I'd be inclined to go with a user-written worksheet function that uses regular expressions. But not everyone will think that level of complication worth the effort.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Phone Numbers Question certified_techy Excel 8 06-08-2012 02:27 AM
Create Custom Labels for Phone numbers Tonistep Outlook 0 03-26-2012 02:57 PM
Extracting a phone number from a string that contains text and numbers. Convert numbers to a specific text string francis Excel 1 10-06-2011 01:43 PM
Extract numbers from a text string aleale97 Excel 4 02-10-2011 10:33 AM
Extracting a phone number from a string that contains text and numbers. Phone number formatting Mark Micallef Outlook 1 08-04-2010 02:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft