+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Separating text from numbers in a single cell

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Separating text from numbers in a single cell

    Hello all,

    I know this has probably been posted before but i'm having trouble finding a solution. I am trying to separate the numbers (possibly without the brackets) from the text, and display only the numbers in the adjacent cell. Please see example below..

    Aberdeen (60659)
    Aberdeen (60659)
    Aberdeen (60659)
    Aberdeen (60659)
    Aberdeen B.A (60786)
    Aberdeen B.A (60786)
    Aberdeen B.A (60786)
    Aberdeen B.A (60786)
    Aberdeen B.A (60786)

    Im hoping someone can help with this as this forms part of an urgent assignment appointed by my boss!

    Many Thanks
    Rick

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Separating text from numbers in a single cell

    You could
    Select the data
    Data-Text to columns
    Delimited
    Other - enter ( in the text box.
    Finish.
    Then in the new number column do a find and replace and replace ) with nothing.
    Good luck.

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Separating text from numbers in a single cell

    RickCov,

    Welcome to the forum!
    Assuming the numbers are always in parentheses, and that those parentheses are the only ones in the cell, you should be able to use this formula to extract the number:
    =--TRIM(MID(SUBSTITUTE(A1,")",REPT(" ",99)),FIND("(",A1)+1,99))
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Separating text from numbers in a single cell

    Hi

    ...Or with formula..

    For TExt>>=LEFT(D3;MATCH(1;ISNUMBER(MID(D3;COLUMN($1:$1);1)*1)*1;0)-1)

    Array formula>>>CSE

    For numbers>>=LOOKUP(9^9;1*RIGHT(TRIM(D3);COLUMN($2:$2)))

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    01-17-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Separating text from numbers in a single cell

    Thanks to you both for the speedy response!!

    OnErrorGoTo() - Thanks, I had tried the text to columns function but the only problem is that I had to repeat this for several thousand incidents.

    Tigeravatar - This worked perfectly thank you so much! I think you may have just saved my skin!

    I like this forum already!

    EDIT: Thanks Fotis, all sorted now

  6. #6
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Separating text from numbers in a single cell

    Quote Originally Posted by RickCov View Post
    OnErrorGoTo() - Thanks, I had tried the text to columns function but the only problem is that I had to repeat this for several thousand incidents.
    You can do the whole column in one go.

+ 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