+ Reply to Thread
Results 1 to 4 of 4

Return text between slashes

  1. #1
    Registered User
    Join Date
    03-22-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    40

    Return text between slashes

    Hi All,

    I would like to return the text between the 4th and 5th slash, in this case "Category". What would the exact formula be? (cannot use text to columns or PQ).

    http://example.com/database/Category...ct/CODE002.jpg

    Appreciate your help, thanks!

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Return text between slashes

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


    Adjust 99, as needed.

    Edit:
    Alternately... you can substitute 4th & 5th "/" with character that does not occur in the string. And use FIND to locate position.
    And then supply that to MID() function to extract.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by CK76; 11-23-2018 at 10:14 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    03-22-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    40

    Re: Return text between slashes

    Thanks CK76, that worked great. What does 99 mean in this context?

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Return text between slashes

    Basically, formula is replacing each "/" with 99 spaces. Since it is large enough number, it will create enough buffer between each character.
    99*4 will fall somewhere in spaces before "Category" and 99 length will fall somewhere after.

    You can see intermediate step, by just using =SUBSTITUTE(A1,"/",REPT(" ",99)

+ 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] Reading from slashes [SOLVED]
    By forumwerk12345 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2017, 03:04 PM
  2. [SOLVED] Insert two slashes if not found
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-06-2015, 01:57 PM
  3. [SOLVED] Extract text from string with forward slashes
    By cherrsak in forum Excel General
    Replies: 8
    Last Post: 04-08-2015, 03:49 PM
  4. Adding In Forward Slashes After text (/)
    By AV1D in forum Excel General
    Replies: 5
    Last Post: 01-19-2012, 07:59 PM
  5. counting slashes in a text
    By Mikeda2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-09-2007, 11:27 PM
  6. [SOLVED] hyphen to forward slashes?
    By bailbust63 in forum Excel General
    Replies: 3
    Last Post: 07-25-2006, 08:00 PM
  7. 8 digit date no slashes
    By dkingston in forum Excel General
    Replies: 8
    Last Post: 03-30-2006, 07:20 PM

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