+ Reply to Thread
Results 1 to 8 of 8

How do you remove all text before the last forward slash?

  1. #1
    Registered User
    Join Date
    05-22-2014
    Posts
    20

    How do you remove all text before the last forward slash?

    Hey everyone,

    Does anyone know a formula where you can remove all the text before the last forward slash?

    For example; entry: Garden/Shed/Table/Ashtray and I would just like Ashtray!

    Any help would be greatly appreciated, don't really fancy going through 3500 records manually!

    Thanks very much for your time, any help would be greatly appreciated,

    Luke

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: How do you remove all text before the last forward slash?

    I'd do it with a simple udf, but I'm rubbish at formulas:
    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    You may then use this formula like any other

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How do you remove all text before the last forward slash?

    Try

    =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"/","@",(LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))/LEN("/"))))

    Source: http://stackoverflow.com/questions/1...ch-in-a-string
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    05-22-2014
    Posts
    20

    Re: How do you remove all text before the last forward slash?

    wow, thanks so much for your quick replies - just trying them now, i'll let you know the results :-)

  5. #5
    Registered User
    Join Date
    05-22-2014
    Posts
    20

    Re: How do you remove all text before the last forward slash?

    Thanks guys, I have tried the formula given by Special K and it works perfectly! Thanks very much for your response too Kyle123, although I haven't tried it (looks a little too complex for me atm) I'm sure someone will find this info useful,

    all the best

    Luke

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: How do you remove all text before the last forward slash?

    No problem Luke
    Last edited by Kyle123; 05-22-2014 at 07:59 AM.

  7. #7
    Registered User
    Join Date
    05-22-2014
    Posts
    20

    Re: How do you remove all text before the last forward slash?

    OK no problem Kyle, I'm sorry about that :

    here is a link to the other forum and was subsequently given another way to solve the problem:

    =TRIM(RIGHT(SUBSTITUTE(A1,"/",REPT(" ",255)),255)) on http://www.mrexcel.com/forum/excel-q...ml#post3815738

    sorry for my unintentional rebelism! I didn't expect such a fast reply and was trying to get a quick answer by spreading the love.

    Have a great one, Luke

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: How do you remove all text before the last forward slash?

    No probs
    Ta muchly

+ 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] multiple record to single with frequent change in string at forward slash
    By cruise.alter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2012, 06:26 AM
  2. Automatic insert of forward slash (/)
    By Shivas Regal in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-08-2010, 04:27 PM
  3. Replies: 1
    Last Post: 03-12-2009, 04:08 AM
  4. Forward Slash Problem
    By mortikiv in forum Excel General
    Replies: 3
    Last Post: 11-06-2007, 01:59 AM
  5. formulae for adding a forward slash automatically into a cell
    By angelgrant in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-21-2006, 08:35 AM

Tags for this Thread

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