+ Reply to Thread
Results 1 to 3 of 3

trim special characters and spaces in selected cells

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    trim special characters and spaces in selected cells

    Hi,

    How do you trim selected cells using a macro wherein all special characters and spaces(only infront and at the end, not including the middle space) are removed and the value that is left are only letters and numbers?

    Example:

    " john3smith.- " will be "john3smith"
    "my2data-*&saved " will be "my2datasaved"
    "sample3 [info#@" will be "sample3 info"
    Last edited by k1dr0ck; 10-13-2015 at 11:11 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: trim special characters and spaces in selected cells

    Try
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: trim special characters and spaces in selected cells

    it works! thanks!

+ 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] How to remove spaces between characters and numbers within cells in Excel?
    By Edgars.Aronietis in forum Excel General
    Replies: 8
    Last Post: 08-26-2015, 07:42 AM
  2. Replies: 8
    Last Post: 12-17-2012, 05:30 AM
  3. [SOLVED] remove spaces (special characters) after numbers
    By fareastwarriors in forum Excel General
    Replies: 13
    Last Post: 11-04-2012, 09:25 PM
  4. Delete all special characters in a selected column
    By vbvamsi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2012, 08:02 AM
  5. [SOLVED] Remove All Text,Special Characters, & Spaces
    By g48dd in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-01-2011, 09:24 AM
  6. Trim function for special characters
    By mpquin in forum Excel General
    Replies: 3
    Last Post: 04-13-2010, 10:05 AM
  7. VBA code to trim spaces and tab from blank cells
    By singhabhijitkumar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2010, 06:48 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