+ Reply to Thread
Results 1 to 14 of 14

Remove all characters after third instance of /

Hybrid View

  1. #1
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Remove all characters after third instance of /

    Something I learnt from one of the gurus here, I think it's called.. padding with spaces and trim? Anyhoo, formulas something like this.

    Formula: copy to clipboard
    =TRIM(LEFT(SUBSTITUTE($A$1,"/",REPT(" ",1000),3),1000))
    Last edited by quekbc; 09-02-2015 at 08:04 PM. Reason: Edit following Pete_UK's advice, re-edited after OPs post

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Remove all characters after third instance of /

    I think you need to keep the "/" in there, so replace "/" with "/" plus a load of spaces.

    Pete

  3. #3
    Registered User
    Join Date
    03-31-2008
    Posts
    11

    Re: Remove all characters after third instance of /

    no, everything AFTER the third...

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Remove all characters after third instance of /

    Quote Originally Posted by djbetterly View Post
    no, everything AFTER the third...
    OK, you need to make up your mind lol...do you want the string BEFORE the 3rd / or AFTER the 3rd /
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] VBA, remove all characters within a string, except numerical characters and full stops
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2015, 09:24 PM
  2. [SOLVED] Remove all characters before or after X# of characters
    By Ocean Zhang in forum Excel General
    Replies: 8
    Last Post: 07-22-2014, 12:13 AM
  3. Remove instance variable from User Define Class
    By rubedario_86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2013, 01:47 AM
  4. Replies: 3
    Last Post: 02-08-2012, 06:26 AM
  5. Remove all but one instance of a value in one column based on records in another colu
    By TheCyrusVirus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2010, 11:31 AM
  6. Replies: 9
    Last Post: 06-19-2009, 03:38 PM
  7. How to return # characters based on 2nd instance of value
    By JDay01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2005, 01:06 PM

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