+ Reply to Thread
Results 1 to 5 of 5

How to extract a varying character-length piece of text from the center of cell's text

  1. #1
    Registered User
    Join Date
    11-20-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2012
    Posts
    11

    Question How to extract a varying character-length piece of text from the center of cell's text

    Your help would be sincerely appreciated!

    I am hoping you would know of a formula to extract text from the center of a cell's text contents. (I don't care whether commas are returned in the result or not, although I will later use the formula result in calculations.)

    In the attached example I've colored red the text I would want to result in the formula's answer. The good news is that the desired text always follows after "Total Revenue: ". The data to be extracted can vary in length, sometimes contains a comma within it as part of the number, and is then always followed by a comma and space.

    I've tried using the FIND/MID formulas, but just don't have the technical expertise to handle anything as complicated as what I'm trying to achieve.

    Looking forward to an encouraging answer to end my day on a high ...
    Attached Files Attached Files

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: How to extract a varying character-length piece of text from the center of cell's text

    Hi RuthK, try this formula:
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,366

    Re: How to extract a varying character-length piece of text from the center of cell's text

    In A2

    =TRIM(LEFT(SUBSTITUTE(MID(A2,SEARCH("Total Revenue:",A2,1),LEN(A2)),"Total Revenue:",""),SEARCH(", ",SUBSTITUTE(MID(A2,SEARCH("Total Revenue:",A2,1),LEN(A2)),"Total Revenue:",""),1)-1))+0

    and copied down as necessary
    Attached Files Attached Files
    Last edited by azumi; 08-13-2014 at 10:36 PM.

  4. #4
    Registered User
    Join Date
    11-20-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2012
    Posts
    11

    Re: How to extract a varying character-length piece of text from the center of cell's text

    Wow!!! Both of those options work beautifully, so to both of you, a HUGE Thank You! I'm adding you to my Hero List.

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,366

    Re: How to extract a varying character-length piece of text from the center of cell's text

    You're welcome, and thanks for provide feedback....

+ 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. Removing various different text, from varying length text strings
    By cloudwalking in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 10:37 AM
  2. Text to Column with Text & Varying-length Numbers
    By vtshipe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2011, 07:35 AM
  3. Extract variable length of text from cell
    By stonegwene in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2011, 03:38 AM
  4. Replies: 1
    Last Post: 04-18-2005, 05:06 PM
  5. Replies: 1
    Last Post: 04-17-2005, 08:10 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