Web Images Videos Maps News Groups Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Sort and exclude certain words
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jds217  
View profile  
 More options Nov 7 2005, 2:57 pm
Newsgroups: microsoft.public.excel.misc
From: jds217 <jds217.1y3yty_1131336001.6...@excelforum-nospam.com>
Date: Sun, 6 Nov 2005 21:57:40 -0600
Local: Mon, Nov 7 2005 2:57 pm
Subject: Sort and exclude certain words

Hi ...

I work in a public library and frequently export lists of books from
our online catalog to Excel, so that I can manipulate the data in
various ways.

My problem in sorting in Excel is this:  Our library catalog excludes
words like "The" "A" or "An" at the beginning of a title when sorting.
Excel, however, does not.

Is there any way I can sort on a field in Excel and have it ignore
certain words at the beginning of a string?

Thanks!

--
jds217
------------------------------------------------------------------------
jds217's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28608
View this thread: http://www.excelforum.com/showthread.php?threadid=482709


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rowan Drummond  
View profile  
 More options Nov 7 2005, 3:19 pm
Newsgroups: microsoft.public.excel.misc
From: Rowan Drummond <rowanzsaNotT...@hotmail.com>
Date: Mon, 07 Nov 2005 15:19:17 +1100
Local: Mon, Nov 7 2005 3:19 pm
Subject: Re: Sort and exclude certain words
One way:

If your data is in column A starting in row 2 then in any unused column
in row 2 enter the formula:
=IF(LEFT(A2,4)="The ",MID(A2,5,256),
IF(LEFT(A2,2)="A ",MID(A2,3,256),
IF(LEFT(A2,3)="An ",MID(A2,4,256),A2)))

Copy this down as far as needed and then select all your data and sort
on this new column.

Hope this helps
Rowan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ron Rosenfeld  
View profile  
 More options Nov 7 2005, 11:39 pm
Newsgroups: microsoft.public.excel.misc
From: Ron Rosenfeld <ronrosenf...@nospam.org>
Date: Mon, 07 Nov 2005 07:39:05 -0500
Local: Mon, Nov 7 2005 11:39 pm
Subject: Re: Sort and exclude certain words
On Sun, 6 Nov 2005 21:57:40 -0600, jds217

I wonder about your card catalog.  For example, is the book "A Tree Grows in
Brooklyn" cataloged under the "A's" or the "T's"?  (or both).

In any event, there are various methods, all of which involve constructing a
separate list that excludes the initial word, and sorting on this new list.

If there are just a few words to be excluded, and not much change in the list,
then a simple, nested IF function as recommended by Rowan will work just fine.

If there are a larger number of words, then a more general solution could be
had by using the following formula to construct your "word-stripped" list.

=IF(COUNTIF(ListOfWords,LEFT(A1,FIND(" ",A1)-1)),
TRIM(MID(A1,FIND(" ",A1)+1,255)),A1)

ListOfWords is a range where you have listed all of the first words which you
want excluded.  You may either NAME the range, or substitute the reference in
the formula (e.g. Z1:Z10)

VBA solutions are also available.

--ron


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google