?
Solved

Pull phone numbers out of cell

Posted on 2014-07-25
3
Medium Priority
?
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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 how to use a scrolling table in Microsoft Excel using the INDEX function.

764 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