+ Reply to Thread
Results 1 to 6 of 6

How to remove Trailing Special Characters

  1. #1
    Registered User
    Join Date
    04-20-2016
    Location
    Philippines
    MS-Off Ver
    2011
    Posts
    2

    Question How to remove Trailing Special Characters

    Hi,

    I have a requirement to remove the trailing semicolons in a column.

    The ";" characters have no fixed location and they may occur once or multiple times or may not be present at the end of the text at all.

    Example:
    TEST 01;;;NAME;ADDRESS;;;;
    TEST 02;;;;ADDRESS STREET;
    TEST 03;;;COUNTRY;;;
    TEST 04;

    How do I remove the trailing ";" characters?

    The result I'm after are:
    TEST 01;;;NAME;ADDRESS
    TEST 02;;;;ADDRESS STREET
    TEST 03;;;COUNTRY
    TEST 04

    I have tried using combinations of LEFT, FIND, and some SUBSTITUTE but it also removed the ";" in between the texts.
    Please Login or Register  to view this content.
    Cheers,

    Donard

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: How to remove Trailing Special Characters

    something like this?
    =TRIM(SUBSTITUTE(A1,";"," "))

    TEST 01 NAME ADDRESS
    TEST 02 ADDRESS STREET
    TEST 03 COUNTRY
    TEST 04

    ups, I lost ;;; between text, sorry

    so try:
    =LEFT(A1,LOOKUP(2,1/(ISNUMBER(SEARCH(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),"abcdefghijklmnopqrstuvwxyz1234567890"))),ROW(INDIRECT("1:"&LEN(A1)))))

    TEST 01;;;NAME;ADDRESS
    TEST 02;;;;ADDRESS STREET
    TEST 03;;;COUNTRY
    TEST 04
    Last edited by sandy666; 04-20-2016 at 07:49 AM.

  3. #3
    Registered User
    Join Date
    02-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: How to remove Trailing Special Characters

    http://www.mrexcel.com/forum/excel-q...-one-go-2.html

  4. #4
    Registered User
    Join Date
    02-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: How to remove Trailing Special Characters

    Check This Above Thread Please

  5. #5
    Registered User
    Join Date
    04-20-2016
    Location
    Philippines
    MS-Off Ver
    2011
    Posts
    2

    Re: How to remove Trailing Special Characters

    Quote Originally Posted by sandy666 View Post
    something like this?
    =TRIM(SUBSTITUTE(A1,";"," "))

    TEST 01 NAME ADDRESS
    TEST 02 ADDRESS STREET
    TEST 03 COUNTRY
    TEST 04

    ups, I lost ;;; between text, sorry

    so try:
    =LEFT(A1,LOOKUP(2,1/(ISNUMBER(SEARCH(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),"abcdefghijklmnopqrstuvwxyz1234567890"))),ROW(INDIRECT("1:"&LEN(A1)))))

    TEST 01;;;NAME;ADDRESS
    TEST 02;;;;ADDRESS STREET
    TEST 03;;;COUNTRY
    TEST 04
    Hi Sandy, Your solution worked perfectly! Thanks so much.

    I'll need to read up on LOOKUP and INDIRECT and add them to my excel vocabulary

    Thanks again.

    Cheers,

    Donard

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: How to remove Trailing Special Characters

    Glad to help thanks for rep.

+ 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. Remove special characters from a column
    By protcg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-02-2015, 03:28 PM
  2. [SOLVED] how remove all special characters except # , & - .
    By Latha Mani in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-13-2014, 07:14 AM
  3. How to remove special characters in a excel
    By Latha Mani in forum Excel General
    Replies: 6
    Last Post: 01-10-2014, 11:33 AM
  4. [SOLVED] Remove ALL Special Characters
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2013, 08:12 PM
  5. Remove special characters
    By humacdeep in forum Excel General
    Replies: 6
    Last Post: 01-14-2012, 03:36 PM
  6. Remove Special Characters
    By bkatzman in forum Excel General
    Replies: 10
    Last Post: 04-13-2010, 11:51 AM
  7. remove trailing characters from number
    By maacmaac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-30-2008, 06:22 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