+ Reply to Thread
Results 1 to 10 of 10

Formula to pull data out of a cell

  1. #1
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Formula to pull data out of a cell

    Hello,

    I have some text data in a cell. I want to pull out some data that's in parentheses, for instance like this:

    NEAR -R-TRAIN (BAY RIDGE) $1250 1bd

    How can I pull out the words BAY RIDGE and put them in another cell?

    Thanks!
    Last edited by SEMMatt; 09-28-2011 at 09:27 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Formula to pull data out of a cell

    Hello,

    with the text in A1, this formula will extract the text between the round brackets

    =MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)

    cheers,

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula to pull data out of a cell

    Put that string in A1, this formula in B1:

    =TRIM(MID(SUBSTITUTE(A1, ")", REPT(" ", 100)), FIND("(", A1) + 1, 99))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to pull data out of a cell

    Thanks Teylyn. Jerry, thanks for posting but teylyns worked first so that's what I'm using.

  5. #5
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to pull data out of a cell

    Hi Guys,

    Need to do a similar task. Have this string of money amount,$1200,which I need to locate. It's the only dollar sign in the cell so I think that I can search by that. The amount of space needed after the sign will usually be 4 but may be 3 (as in $900).

    Need a formula though.

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Formula to pull data out of a cell

    This will return the value as a number

    =TRIM(MID(A1,FIND("$",A1)+1,4))+0

    if you want the value as text, remove the +0 from the formula.

    This will work for numbers with 3 or four digits.

  7. #7
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to pull data out of a cell

    teylyn, That worked brilliant too! I have a few more. (I'm trying to do these on my own but I'm still a beginner).

    I have this text: 1bd and I need to search for it in a cell and print the number 1 in my new cell. Alternatively, it could be 2bd and print 2.

  8. #8
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to pull data out of a cell

    this is what I've got for that last one:
    =MID("bd",FIND("bd",Sheet1!V27,1),-1)

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Formula to pull data out of a cell

    SEMMAtt,

    you should start a new thread when you are asking a new question. Otherwise, how can you ever mark a thread as "solved", indicating that the question asked in your first post has been answered? Tacking on more and more follow-up questions has a few disadvantages. A new question with 0 replies will attract much more attention from a wider range of members than an old thread with dozens of replies.

    So, please, start a new thread for this latest question.

    It would also help if you could attach an Excel workbook with a data sample, where you manually enter the desired result you want to achieve.

    cheers,

  10. #10
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to pull data out of a cell

    teylyn,

    Sorry about the confusion. I closed this post after a few brilliant answers were received from you and Jerry. I thought that I could take your answers and apply them to my other related questions but turns out I needed more help. I reopened the post because all my questions are similar I think.

    I'm closing this post as Solved now and reposting here as you suggest: http://www.excelforum.com/excel-gene...ml#post2608776

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1