+ Reply to Thread
Results 1 to 7 of 7

extract data from string of text

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

    extract data from string of text

    Hi

    Could you pls help me to extract "-6,0%" from the following string of text?

    Pls see attached file.

    thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: extract data from string of text

    Is this all you have, one sample? Surely there is more... If so, please update your sample to show many different samples.

    If this is it, just use >> Data >> Text to Columns >> Fixed Width
    HTH
    Regards, Jeff

  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 data from string of text

    This formula will do that for you:

    =MID(A1,FIND("-",A1),5)

    Hope this helps.

    Pete

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: extract data from string of text

    Or try:

    =IFERROR(TRIM(RIGHT(SUBSTITUTE(LEFT(A1,SEARCH("</font>",A1)-1),">",REPT(" ",20)),20)),"")

    =-LOOKUP(1,-MID(A1,FIND("</font>",A1)-{1,2,3,4,5,6,7},{1,2,3,4,5,6,7}))

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

    Re: extract data from string of text

    Quote Originally Posted by Pete_UK View Post
    This formula will do that for you:

    =MID(A1,FIND("-",A1),5)

    Hope this helps.

    Pete
    Thanks. The numbers within the string of text may differ e.g. -60%, -60,8%, etc. Need a formula that would be able to handle these variations.

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

    Re: extract data from string of text

    Quote Originally Posted by jeffreybrown View Post
    Is this all you have, one sample? Surely there is more... If so, please update your sample to show many different samples.

    If this is it, just use >> Data >> Text to Columns >> Fixed Width
    Thanks. The numbers within the string of text may differ e.g. -60%, -60,8%, etc. Need a formula that would be able to handle these variations.

  7. #7
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: extract data from string of text

    Perhaps…….

    In B1, enter :

    =FILTERXML(A1,"//font")

    Regards
    Bosco

+ 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 Data from a text string
    By Atul Maskara in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-08-2014, 08:56 AM
  2. [SOLVED] Extract data from text string
    By cmb80 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2014, 11:53 AM
  3. [SOLVED] Extract data from text string
    By cmb80 in forum Excel General
    Replies: 14
    Last Post: 07-16-2014, 11:29 AM
  4. [SOLVED] Extract text from a given point in a text string, when data points do not share the given
    By reedersketer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2014, 03:57 PM
  5. Extract data from text string to columns
    By bigband1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2012, 09:12 AM
  6. Extract data from text string
    By bigband1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2011, 04:55 AM
  7. Extract number data string from text
    By lamatao in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2009, 04:27 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