Solved

Pull phone numbers out of cell

Posted on 2014-07-25
3
156 Views
Last Modified: 2014-10-10
I have a column of data that has memo's in them. Short paragraphs are in each cell.

I would like to try to pull out any phone number listed in the memo in the next column. The phone numbers can be of any format ie: xxx.xxx.xxxx or (xxx) xxx-xxxx or xxxxxxxxxx.

If easier, I can write something for each format. For example pull out any phone number in the format (XXX) XXX-XXXX. Then another for any in the format XXX.XXX.XXXX. Then another for XXX-XXX-XXXX. Then one for XXX-XXX-XXXX.

Any way to make that happen? This could save me HOURS of time!
0
Comment
Question by:cansevin
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 40220855
Will those be the only numbers in that string? If so you can try this:
=SUM(MID(0&A1,LARGE(ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))*ROW(INDIRECT("1:"&LEN(A1))),ROW(INDIRECT("1:"&LEN(A1))))+1,1)*10^ROW(INDIRECT("1:"&LEN(A1)))/10)

Open in new window

This is an array formula so after you paste it, hit ctrl+shift+enter. Change "A1" to your target cell.
Flyster
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40221011
^^^ That is one amazing function, Flyster.  The only possible issue is if other numbers exist, but I bet this will work for the questioner in almost all cases.
0
 
LVL 22

Expert Comment

by:Flyster
ID: 40222073
@Glenn Ray. Thanks, but I really can't take credit for it. I came across it several years ago when I was looking to strip the numeric from a string. I only wish I would have documented where I got it from! You are correct. It will list all the numbers in that string.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
location range 4 22
Excel Score Formula 5 49
splitting text of cell to columns 14 24
NEED TO UPDATE DATA IN EXCEL 18 32
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now