+ Reply to Thread
Results 1 to 7 of 7

Remove the characters after last Forward slash

  1. #1
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Remove the characters after last Forward slash

    Hi Team,

    I want to remove the last characters of text strings.
    Condition: Remove all the characters after the last Forward Slash (Including last Forward slash).

    Part# Expected Result
    MBZ/MBR/BR02/W99 MBZ/MBR/BR02
    MBZ/MBR/BR02/WERR/56 MBZ/MBR/BR02/WERR
    MBZ/MBR MBZ
    MBZ MBZ

    Regards
    Shareez

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Remove the characters after last Forward slash

    Hi,

    Try the following in B1:

    =IFERROR(LEFT(A1,FIND("@",SUBSTITUTE(A1,"/","@",LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))))-1),A1)

  3. #3
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Remove the characters after last Forward slash

    Thanks a ton.

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

    Re: Remove the characters after last Forward slash

    another try

    =LEFT(A1,FIND("[",SUBSTITUTE(A1,"/","[",LEN(A1)-LEN(SUBSTITUTE(A1;"/",""))))-1)

  5. #5
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Remove the characters after last Forward slash

    Hi Cbatrody,

    You helped me.

    Can i know how "@" works?

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Remove the characters after last Forward slash

    Hi Shareez,

    '@' or '[' is a character which is not part of the search string. This is used to identify the last "\" or the last search character in the cell.

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

    Re: Remove the characters after last Forward slash

    And another.

    =IFERROR(LEFT(A1,LOOKUP(25^25,FIND("/",A1,ROW($1:$40)))-1),A1)
    Dave

+ 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] Search Function for String with Forward Slash
    By T86157 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-30-2015, 01:10 PM
  2. Replies: 2
    Last Post: 08-21-2014, 01:27 PM
  3. How do you remove all text before the last forward slash?
    By lukesmith7 in forum Excel General
    Replies: 7
    Last Post: 05-22-2014, 07:59 AM
  4. How do you remove text before the last forward slash?
    By lukesmith7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2014, 07:31 AM
  5. Automatic insert of forward slash (/)
    By Shivas Regal in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-08-2010, 04:27 PM
  6. Replies: 1
    Last Post: 03-12-2009, 04:08 AM
  7. Forward Slash Problem
    By mortikiv in forum Excel General
    Replies: 3
    Last Post: 11-06-2007, 01:59 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