+ Reply to Thread
Results 1 to 3 of 3

Trouble removing leading spaces

  1. #1
    Registered User
    Join Date
    04-08-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Trouble removing leading spaces

    I've downloaded some stock codes from a website such as the following, and can't remove
    leading spaces with the Alignment function or TRIM() - any suggestions please?

    AA
    AABA
    AAL
    ABCB
    *ABGLF
    ABNK
    ABT
    etc...

    and just now I noticed that when I entered the data here an asterisk appeared in front of one -
    would this be some sort of hidden character?
    Last edited by jp001; 10-06-2017 at 04:13 AM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Trouble removing leading spaces

    hi there. i cant see any leading space in front of your data. a sample excel file would be good. otherwise, try these methods:
    1. start from 2nd letter
    =MID(A1,2,LEN(A1))

    2. find out what is the space. i suspect it could be line spaces (char 10) or non-breaking spaces (char 160).
    =CODE(LEFT(A1))
    change it by using SUBSTITUTE:
    =SUBSTITUTE(A1,CHAR(10),"")
    or:
    copy the code from the 1st formula. press CTRL + H to find and replace. paste that in Find. Replace with nothing

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    04-08-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Trouble removing leading spaces

    Actually it seems they've evilly inserted asterisks randomly. Thankfully tho I've found I can
    d/l the data into a csv file so I won't tear my hair over this one - thanks for your help anyhoo

+ 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. Delete Trailing Spaces without Removing leading zeros WITHOUT TRIM
    By Zach51215 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2013, 04:24 PM
  2. [SOLVED] Removing leading and trailing spaces
    By mangesh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-18-2013, 05:25 AM
  3. trim leading spaces
    By captain bob in forum Excel General
    Replies: 2
    Last Post: 08-03-2006, 10:00 AM
  4. trim leading spaces
    By [email protected] in forum Excel General
    Replies: 10
    Last Post: 05-11-2006, 04:25 PM
  5. [SOLVED] How do I add leading spaces to a value?
    By Chris Brown in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-03-2006, 01:35 PM
  6. Insert leading spaces
    By DejaVu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2006, 10:09 AM
  7. 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