+ Reply to Thread
Results 1 to 6 of 6

excel replace character 160

  1. #1
    Registered User
    Join Date
    04-14-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    127

    excel replace character 160

    Hi everyone,

    I would love to have a macro to remove space from cells. I tried TRIM function but its removing extra spaces only & not remove trailing space at the end of the string.

    Thanks for your help in advance!

    Regards,
    Vikas

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: excel replace character 160

    =substitute(a1,char(160),"") will do it...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: excel replace character 160

    To trim all cells on a sheet incl char 160, try:
    Please Login or Register  to view this content.
    Best,
    berlan

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: excel replace character 160

    and with formula, alternatively:
    =trim(substitute(a1,char(160)," "))

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: excel replace character 160

    Also by code, either:
    Please Login or Register  to view this content.
    or,
    Please Login or Register  to view this content.
    where the second replaces the char 160 with a space

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

    Re: excel replace character 160

    Please Login or Register  to view this content.

+ 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. Replies: 5
    Last Post: 06-03-2011, 10:00 AM
  2. Excel 2003 SP3 - Replace LineFeed character
    By Trotamundos in forum Excel General
    Replies: 12
    Last Post: 05-20-2008, 10:54 AM
  3. [SOLVED] find a character and replace with a command in Excel
    By Jo in forum Excel General
    Replies: 1
    Last Post: 06-27-2006, 07:55 AM
  4. Replies: 8
    Last Post: 08-17-2005, 09:05 PM
  5. [SOLVED] How do I replace * as a character in a string in Excel?
    By nicolegt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2005, 07:06 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