+ Reply to Thread
Results 1 to 10 of 10

Return a specific string in text without using text functions.

  1. #1
    Registered User
    Join Date
    08-19-2021
    Location
    Albany, OR
    MS-Off Ver
    Excel 2013
    Posts
    2

    Return a specific string in text without using text functions.

    For automation purposes, I am trying to extract an identifying number from a cell that has multiple, varying characters on either side (hence why no left or right, unless you have a fancy way to use them). Workbook attached
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return a specific string in text without using text functions.

    Hello wdguitar. Welcome to the forum.

    Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,469

    Re: Return a specific string in text without using text functions.

    One way:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return a specific string in text without using text functions.

    Here's another way if that space character following the 'target' string is always the 3rd space.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,469

    Re: Return a specific string in text without using text functions.

    @FR: quicker and neater . I ALWAYS forget that approach and go back to my first principles. One day it will sink in .

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return a specific string in text without using text functions.

    @ TMS

    Yeah I feel your pain. These are often tempting to play with off screen.

  7. #7
    Registered User
    Join Date
    08-19-2021
    Location
    Albany, OR
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Return a specific string in text without using text functions.

    This worked great! Thank you so much!

  8. #8
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Return a specific string in text without using text functions.

    I think this formula should also work...
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 08-19-2021 at 10:31 PM.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,469

    Re: Return a specific string in text without using text functions.

    @Rick: concatenating a potentially missing value to the end of the string to avoid the FIND failing … yet another approach that doesn't automatically come to mind. Must try to improve my memory!

  10. #10
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Return a specific string in text without using text functions.

    This may be work also.

    In B2
    =trim(mid(substitute(a2&" "," ",rept(" ",len(a2)+1)),(len(a2)+1)*2+find("#",a2)-1,len(a2)))

    2 from 2 spaces before # sign.

    Regards.

+ 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] IF functions has specific text, then multiply or divide dependant on text string
    By npereira in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2018, 12:19 PM
  2. Replies: 2
    Last Post: 05-14-2015, 01:30 PM
  3. Extract/return specific text from cell/string
    By JE2BD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2015, 05:32 PM
  4. [SOLVED] Find specific text in a string and return that text
    By K_Red in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-24-2013, 07:50 AM
  5. [SOLVED] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  6. [SOLVED] Return specific text string
    By kingi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-20-2013, 11:17 AM
  7. [SOLVED] Find Specific Text in Text String and Return Value in Adjacent Column
    By watchouse in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 03:53 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