+ Reply to Thread
Results 1 to 7 of 7

Combine Substitute and Textbefore?

  1. #1
    Registered User
    Join Date
    06-12-2017
    Location
    Victoria, Australia
    MS-Off Ver
    Office365
    Posts
    39

    Combine Substitute and Textbefore?

    My dataset has a bunch of descriptions that are all prefixed with a standard prefix. Per my example, the standard prefix has the following format:

    "ABC+ Rx.x : description"

    I only want to return the "Rx.x" substring from my descriptions.

    Using Textbefore, I can get everything before ":", but I also want to exclude "ABC+ " so that only "Rx.x" is returned.

    How can I achieve this in one formula?
    Attached Files Attached Files

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,944

    Re: Combine Substitute and Textbefore?

    Cell J6 formula , Drag down

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

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Combine Substitute and Textbefore?

    One minor change:

    =TEXTBEFORE(TEXTAFTER(C6,"+ "),":")

    .. with a space after the +, so that the result starts with a letter, not a space.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,944

    Re: Combine Substitute and Textbefore?

    Thanks to Glenn Kennedy for correcting

  5. #5
    Registered User
    Join Date
    06-12-2017
    Location
    Victoria, Australia
    MS-Off Ver
    Office365
    Posts
    39

    Re: Combine Substitute and Textbefore?

    Perfect, thank you - you guys always come up with the goods here. I'm always learning something new

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Combine Substitute and Textbefore?

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,944

    Re: Combine Substitute and Textbefore?

    @mwot You're Welcome. Glad to help . Thank You for the feedback and 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. [SOLVED] Combine Vlookup, Trim and Substitute in VBA
    By Phil2021 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-21-2021, 11:07 PM
  2. [SOLVED] There is a way to Combine 2 Formulas RIGHT & SUBSTITUTE in One Cell ?
    By yannipr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-05-2016, 03:51 PM
  3. [SOLVED] How to combine If and Substitute in Excel
    By alonecupid in forum Tips and Tutorials
    Replies: 4
    Last Post: 02-11-2016, 04:24 AM
  4. Vlookup and Substitute - Combine
    By Stressed_Daniel in forum Excel General
    Replies: 2
    Last Post: 07-16-2015, 07:38 AM
  5. [SOLVED] Evaluate non-blank, substitute and combine
    By Atticus_Finch in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-30-2013, 04:53 PM
  6. [SOLVED] Combine VLOOKUP and SUBSTITUTE Functions?
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-03-2013, 11:00 AM
  7. How to combine multiple substitute functions?
    By ron_b_michigan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2012, 11:15 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