+ Reply to Thread
Results 1 to 7 of 7

extract text from cell

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    extract text from cell

    Hi

    I have one column of cells with values such as 0001.hk or 020.hk. I would like to have another column that extracts only the text "hk". Appreciate your help.

    regards

    LL

  2. #2
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: extract text from cell

    =mid(a1,sumproduct((isnumber(--mid(a1,row(1:100),1))*1))+2,len(a1))

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: extract text from cell

    Thanks. This worked for my two examples. However, when I put in B20.si, I would like to see "si" but instead I see ".si". What is want is to extract the two alphabets to the right of the "." all the time. There can be any number of characters to the left of ".".

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extract text from cell

    Try this

    =IFERROR(MID(A1,FIND(".",A1)+1,5),"")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: extract text from cell

    =right(a1,2) if its always only 2 characters
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extract text from cell

    Glad it worked for you and thank you for your feedback.

  7. #7
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: extract text from cell

    for general result is there any characters before or after the numbers try this one:

    array formula

    =MID(A1,MIN(IFERROR(IF(--MID(A1,ROW(1:100),1),ROW(1:100)),"")),COUNT(--MID(A1,ROW(1:100),1)))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] extract text from cell
    By dbmrexcel1981 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2013, 10:29 AM
  2. [SOLVED] Extract/Copy Text from Cell, and insert that text in a new row below
    By jamesoneill in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-07-2013, 09:06 AM
  3. Extract URL's from a text cell
    By euanb21 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-06-2012, 04:38 PM
  4. Replies: 12
    Last Post: 09-15-2012, 10:20 PM
  5. Replies: 3
    Last Post: 07-25-2012, 07:54 AM

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