+ Reply to Thread
Results 1 to 6 of 6

How to Remove Leading Spaces in excel

Hybrid View

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

    How to Remove Leading Spaces in excel

    Hi all,

    Please help me in deleting first space.

    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 2406
    Posts
    44,662

    Re: How to Remove Leading Spaces in excel

    try =trim(a1) in the first instance, but if you have a CHAR 160 in the text, you'll need this:

    =SUBSTITUTE(TRIM(A1),CHAR(160),"")
    Last edited by Glenn Kennedy; 05-21-2015 at 08:18 AM.
    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

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: How to Remove Leading Spaces in excel

    try using TRIM()
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Winterville, NC
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: How to Remove Leading Spaces in excel

    Glenn - What is CHAR 160?

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

    Re: How to Remove Leading Spaces in excel

    It's a non-breaking space. Frequently found on stuff downloaded from the www, it often causes formulae to fail, lookups, etc, as the writer isn't aware that it's there. TRIM doesn't get rid of it so SUBSTITUTE is needed.

    Take a look at the attachment to Post 4 in this thread from a couple of days ago...

    http://www.excelforum.com/excel-form...hing-text.html

  6. #6
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Winterville, NC
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: How to Remove Leading Spaces in excel

    Thanks for the explanation Glenn!

+ 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] Remove leading and tariling spaces
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2015, 01:53 PM
  2. [SOLVED] Remove leading and trailing spaces in a cell?
    By LF_CC in forum Excel General
    Replies: 4
    Last Post: 12-05-2013, 03:12 PM
  3. Remove Leading Spaces
    By edwardpestian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2006, 10:34 AM
  4. [SOLVED] VBA help please - remove leading spaces
    By Scott Wagner in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2006, 04:20 PM
  5. Remove Leading Spaces
    By Kirk P. in forum Excel General
    Replies: 6
    Last Post: 03-09-2005, 12:10 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