+ Reply to Thread
Results 1 to 4 of 4

Pathname - Delete everything before a /

  1. #1
    Registered User
    Join Date
    09-22-2007
    Posts
    81

    Pathname - Delete everything before a /

    Delete everything before a /
    I've search through and seen this link http://www.rondebruin.nl/folder.htm but I can't seem to find out how to get everything deleted before the / but keep everything after
    example
    8 In 1 Pet Products/Small Animal Health

    I just want
    small animal health

    So how could I create a macro to do this?

  2. #2
    Registered User
    Join Date
    09-22-2007
    Posts
    81
    Hmm no worries I think I'll keep using replace button

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Quote Originally Posted by robert_harper
    Hmm no worries I think I'll keep using replace button
    If you want a formula try

    =MID(A1,FIND("/",A1)+1,999)
    Assumes only one / in string as per example

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning robert_harper

    You haven't really been that clear in what you want really - do you want to remove this from a sheet, within a macro? To do this effectively you need VBA, and this custom function should do what you need :

    Please Login or Register  to view this content.
    to call it from a worksheet use a formula like :
    =RemovePath("C:\TestDir\MyDocs\Test.xls")
    to return Test.xls
    Please familiarise yourself with the rules before posting. You can find them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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