+ Reply to Thread
Results 1 to 8 of 8

Extract Words to left of a Symbol (If the symbol exists)

  1. #1
    Registered User
    Join Date
    12-29-2020
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    2

    Extract Words to left of a Symbol (If the symbol exists)

    Hi new member here. Can anyone offer any help on this please?

    I'm trying to create a formula that will effectively remove the Pipe symbol, the spaces at both sides of the Pipe symbol and everything after it. Not all cells contain a Pipe symbol, in that case the contents of that cell are good to go. So I guess =IF needs to be used with =LEFT and =SEARCH. I just can't get it to work.

    The top list is the original and bottom list is what I'm after.

    Many thanks

    EBT63765712 | EAX66482504(1.0)
    EAY63630201 | EAX66171501(2.0)
    6871L-3806D | 6870C-0532A
    RSAG7.820.7962/ROH
    RSAG7.820.7748/ROH
    55T32-C0F | UZ-5550T32C11
    EBT64446702 | EAX67133404(1.0)
    EAY64511101 | EAX67189201(1.6)
    1-883-753-12
    1-883-917-11
    EDL_4LV0.3
    1-883-300-11 | 1-732-438-11
    BN94-12644A | BN41-02568B
    BN44-00807F
    BN94-12438C | BN41-02568B
    BN44-00807A


    EBT63765712
    EAY63630201
    6871L-3806D
    RSAG7.820.7962/ROH
    RSAG7.820.7748/ROH
    55T32-C0F
    EBT64446702
    EAY64511101
    1-883-753-12
    1-883-917-11
    EDL_4LV0.3
    1-883-300-11
    BN94-12644A
    BN44-00807F
    BN94-12438C
    BN44-00807A
    Last edited by billsy; 12-29-2020 at 10:16 AM.

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

    Re: remove the Pipe symbol, the spaces at both sides of the Pipe symbol and everything aft

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I have done it for you this time.)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  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: remove the Pipe symbol, the spaces at both sides of the Pipe symbol and everything aft

    =IFERROR(TRIM(LEFT(A2,SEARCH("|",A2)-1)),A2)

    will do thta.
    Attached Files Attached Files
    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 Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,695

    Re: remove the Pipe symbol, the spaces at both sides of the Pipe symbol and everything aft

    Try this:

    =IFERROR(LEFT(A1,FIND(" |",A1)-1),A1)

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

    Re: remove the Pipe symbol, the spaces at both sides of the Pipe symbol and everything aft

    Hi & welcome to the board.
    How about
    =LEFT(A2,FIND(" |",A2&" |")-1)

  6. #6
    Registered User
    Join Date
    12-29-2020
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    2

    Re: Extract Words to left of a Symbol (If the symbol exists)

    Brilliant thank you everyone. Have a great day and happy new year.

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

    Re: Extract Words to left of a Symbol (If the symbol exists)

    Glad to help & thanks for the feedback.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,695

    Re: Extract Words to left of a Symbol (If the symbol exists)

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Is it possible for Excel to search and then start a new search from where it left off?
    By stardustandsunshine in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2018, 09:07 PM
  2. [SOLVED] left / mid / Search
    By wayneg in forum Excel General
    Replies: 2
    Last Post: 02-20-2015, 09:41 AM
  3. Truncate text strings using LEFT and FIND/SEARCH for multiple search terms
    By ngdoherty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2013, 07:51 PM
  4. Search row from right to left for first non-zero value
    By johnnyk in forum Excel General
    Replies: 3
    Last Post: 03-08-2007, 02:19 AM
  5. [SOLVED] Right to left search
    By Martin in forum Excel General
    Replies: 4
    Last Post: 07-31-2006, 08:58 AM
  6. SEARCH, FIND, LEFT...??
    By virfir97@yahoo.com in forum Excel General
    Replies: 3
    Last Post: 08-26-2005, 11:05 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