+ Reply to Thread
Results 1 to 4 of 4

Sorting formula?

  1. #1
    Registered User
    Join Date
    03-08-2006
    Posts
    2

    Post Sorting formula?

    Hello, i have been hand out a very large list of book titles (in french)..many of titles have "La" or "Le" or "L'" in front the the first word...would there be a solution for me when i'm sorting that these could be bypass?...hope someone has a bright idea...it would save me lots of time

  2. #2
    Miguel Zapico
    Guest

    RE: Sorting formula?

    Create a column beside with a formula like this:
    =IF(OR(LEFT(A1,2)="Le",LEFT(A1,2)="L'",LEFT(A1,2)="La"),MID(A1,4,LEN(A1)),A1)
    It will trim the first 3 characters -you can change to 2 using
    MID(A1,3,LEN(A1))- of the cell if it fills any of the criteria, or leave it
    untouched if not.
    Then sort by this column.
    --
    It is nice to be important, but it is more important to be nice


    "crestars" wrote:

    >
    > Hello, i have been hand out a very large list of book titles (in
    > french)..many of titles have "La" or "Le" or "L'" in front the the
    > first word...would there be a solution for me when i'm sorting that
    > these could be bypass?...hope someone has a bright idea...it would save
    > me lots of time
    >
    >
    > --
    > crestars
    > ------------------------------------------------------------------------
    > crestars's Profile: http://www.excelforum.com/member.php...o&userid=32267
    > View this thread: http://www.excelforum.com/showthread...hreadid=520181
    >
    >


  3. #3
    Dave O
    Guest

    Re: Sorting formula?

    Here's one way, assuming your title is in column A and the first title
    is in cell A1: insert a blank "helper" column next the the title column
    (so the helper is column B). Paste this formula into B1:
    =IF(MID(A1,1,3)="La ",MID(A1,4,LEN(A1))&",
    "&MID(A1,1,3),IF(MID(A1,1,3)="Le ",MID(A1,4,LEN(A1))&",
    "&MID(A1,1,3),IF(MID(A1,1,4)="Les ",MID(A1,5,LEN(A1))&",
    "&MID(A1,1,4),IF(MID(A1,1,3)="L' ",MID(A1,4,LEN(A1))&",
    "&MID(A1,1,3),IF(MID(A1,1,2)="L'",MID(A1,3,LEN(A1))&",
    "&MID(A1,1,2),A1)))))

    This formula checks for La, Le, Les, L', and "L' " (note the space:
    it's intended to catch keyboard entry errors) and moves those definite
    articles to the end of the title entry. If the definite articles are
    not present, the entire title as entered is returned. Then sort on the
    helper column. Note that you must specify entire rows to sort, in this
    context.


  4. #4
    Registered User
    Join Date
    03-08-2006
    Posts
    2

    thank you so much

    boy you guys are very very good and so nice..thanks a bunch!

+ 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