+ Reply to Thread
Results 1 to 7 of 7

Extract Portion of a Text String

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    810

    Extract Portion of a Text String

    Hi,

    I have text in a cell in the following format:

    "Country 1: Text"

    The number of the country may be 1, 2, 3 or 4.

    Can someone please suggest a formula to extract the text after the colon and following space. i.e. "Text" in my example?

    Thanks!
    Last edited by andrewc; 07-15-2020 at 10:55 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,778

    Re: Extract Portion of a Text String

    Yes.

    =MID(A1,FIND(":",A1)+2,99)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Extract Portion of a Text String

    If your string is in A1, you could use this formula:

    =IFERROR(RIGHT(A1,LEN(A1)-FIND(": ",A1)-1),"")

    It will return a blank if A1 does not contain a colon-blank.

    Hope this helps.

    Pete

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Extract Portion of a Text String

    Another option
    =REPLACE(A2,1,FIND(":",A2)+1,"")

  5. #5
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    810

    Re: Extract Portion of a Text String

    Thanks very much!

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Extract Portion of a Text String

    Glad we could help & thanks for the feedback.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,778

    Re: Extract Portion of a Text String

    Thanks for the rep.

+ 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. Extract a portion from string
    By irfankundi786 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-06-2016, 01:51 PM
  2. Extract the bold portion of the text in a cell
    By hfearing in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-28-2015, 07:38 PM
  3. How to extract a portion of URL and merge it with a string
    By emymeeky in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-09-2015, 11:39 AM
  4. [SOLVED] Highlight a portion of string text (the string text is a value of a formula)
    By RaymondH in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2012, 06:50 AM
  5. [SOLVED] Extracting a portion of a text string
    By Dave H9 in forum Excel General
    Replies: 4
    Last Post: 06-18-2012, 03:54 AM
  6. [SOLVED] How do I extract a portion of a string into an adjacent cell?
    By tura910 in forum Excel General
    Replies: 4
    Last Post: 03-26-2012, 08:40 AM
  7. Extract a specific portion of a text string in Excel?
    By drawkcaB in forum Excel General
    Replies: 3
    Last Post: 05-18-2010, 01:48 PM

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