+ Reply to Thread
Results 1 to 10 of 10

Replace parts of a cell (Numbers and letters)

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    33

    Replace parts of a cell (Numbers and letters)

    Hi, I need to extract 2 specific different "IDs" from each cell into 2 different cells.

    Example:

    95-02-87 D (GD-08-1347)

    I managed to extract the "95-02-87 D" by using: Find: (*) Replace with: blank

    How do I extract the numbers? So the only thing im left with is "GD-08-1347"?

    Preferably the "(" and ")" shouldn't be there aswell.

    Thanks alot guys I can do it manually, but its over 1000 cells =/

  2. #2
    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: Replace parts of a cell (Numbers and letters)

    Hi and welcome to the forum.

    One way could be this.

    =RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))
    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.

  3. #3
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Replace parts of a cell (Numbers and letters)

    If the pattern is the same:
    =SUBSTITUTE(RIGHT(A1,FIND("(",A1)-1),")","")

    95-02-87 D (GD-08-1347) GD-08-1347
    95-02-87 E (G6-08-1347) G6-08-1347
    49-02-87 B (bb-08-1347) bb-08-1347

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Replace parts of a cell (Numbers and letters)

    Hi

    You can try this too..

    =TRIM(SUBSTITUTE(MID(A1,FIND("(",A1)+1,LEN(A1)),")",""))
    Click *, if my suggestion helps you. Have a good day!!

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Replace parts of a cell (Numbers and letters)

    The first part
    Please Login or Register  to view this content.
    The second ...
    Please Login or Register  to view this content.
    This will allow for characters after the ")", e.g. trailing spaces or non-printing characters such as CHAR(160), etc.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    06-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Replace parts of a cell (Numbers and letters)

    Thanks for all the help!

    But im sorry if this sounds stupid, where exactly am I supposed to fill in the different formulas you guys gave me?

    So far I have used the function "Find % Select" in excel.

    PS: I am using excel 2007, thought it was 2010.

    And I see some type A2 here, and some A1, this is a cell I can copy and drag down right? So the A jumps to A2, A3 etc when I move 1 cell down?

  7. #7
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Replace parts of a cell (Numbers and letters)

    If youd ata are in Column A put the formmula(s) in B1(and C1) and copy/drag down.
    You should get result you required

  8. #8
    Registered User
    Join Date
    06-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Replace parts of a cell (Numbers and letters)

    Thats the thing. When I paste the formulas, I get an error saying: The formula you typed contains an error

    When I press enter, it leads me to the phrase "find" in the formula

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Replace parts of a cell (Numbers and letters)

    It might be your regional delimiter.
    Change the comma seperators to semicolons.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Marcol; 06-19-2012 at 07:20 AM.

  10. #10
    Registered User
    Join Date
    06-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Replace parts of a cell (Numbers and letters)

    Thanks ALOT! Worked like a charm :D

+ 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