+ Reply to Thread
Results 1 to 5 of 5

Remove leading characters.

  1. #1
    Registered User
    Join Date
    11-28-2018
    Location
    London
    MS-Off Ver
    365
    Posts
    2

    Remove leading characters.

    I have a cell with this data and the number of commas at the end differ. How do I re move these commas?

    Form this 1st Port Natal Sea Scouts Base, Durban, , ,, ,

    To this 1st Port Natal Sea Scouts Base, Durban

    Thank you very much for your help.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Remove leading characters.

    Try this
    Enter formula in cell B1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 1st Port Natal Sea Scouts Base, Durban, , ,, , 1st Port Natal Sea Scouts Base, Durban
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    11-28-2018
    Location
    London
    MS-Off Ver
    365
    Posts
    2

    Re: Remove leading characters.

    Thank you so much. You are Awesome! it worked. If it is not a problem, please explain how this formula works?

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Remove leading characters.

    Or

    =LEFT(A1,MATCH(2,INDEX(1/(CODE(MID(A1,ROW(1:99),1))>96),)))

    MID(A1,ROW(1:99),1) to split each character.

    CODE(MID()) to find character code Code("a") = 96 Code("z") = 122 code(",") = 44
    CODE()>96 a,…,z will be true "," will be fault

    1/code() true will get 1 false will get #DIV/0!

    Match use to find MATCH(2,index(1/code())) if for find last position of character.

  5. #5
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: Remove leading characters.

    Or……………

    =LEFT(A1,MATCH(1,INDEX(0/(MID(A1,ROW(1:99),1)>"9"),)))

    Regards
    Bosco

+ 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] If function true then remove leading 8 characters false enter as is.
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2017, 07:01 AM
  2. Remove Text characters, leaving numerical characters
    By aschwalge in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-01-2016, 06:42 PM
  3. [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
  4. Replies: 11
    Last Post: 01-23-2013, 02:04 PM
  5. Ignoring leading characters while numbering rows
    By Sebo in forum Excel General
    Replies: 7
    Last Post: 08-04-2011, 06:27 PM
  6. Delete leading number of characters in column
    By watkec in forum Excel General
    Replies: 5
    Last Post: 05-20-2010, 05:27 PM
  7. Ignoring leading characters in a sort
    By tas666 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 09-21-2006, 03:45 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