+ Reply to Thread
Results 1 to 3 of 3

Leading spaces causing sort problem

  1. #1
    Registered User
    Join Date
    08-19-2009
    Location
    Long Beach
    MS-Off Ver
    CA
    Posts
    43

    Leading spaces causing sort problem

    Hi,

    I am trying to sort a database with about 500,000 names. For some reason, about half my data has leading spaces and half do not. I have taken a screenshot at the divide so you can see what I mean.

    The sort in the picture is in this order:

    Column D
    Column C
    Column A

    Is there any way to mass purge these leading spaces in Column D (column b also has the issue but the fix is not nearly as important as for column D)?
    Attached Images Attached Images
    Last edited by Delta223; 01-30-2010 at 03:52 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Leading spaces causing sort problem

    Hi Delta,

    use one of the columns to the right and put in this formula in row 1

    =trim(D1)

    copy down to the end of your data, then copy that column and use Edit - Paste Special - Values to paste it over the data in column D. You can then delete the formula column and re-sort.

    Repeat the process for the other column with leading spaces.

    hth

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Leading spaces causing sort problem

    Maybe this thread can some how help you

    See Post # 2
    Find and replace blank characters

    HTH
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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