A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I alphabetize data excluding words like "a" and "the"?



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2006, 09:28 PM posted to microsoft.public.excel.misc
Faith
external usenet poster
 
Posts: 67
Default How can I alphabetize data excluding words like "a" and "the"?

I'm cataloging a list of movies, and I'd like to be able to alphabetize the
titles ignoring words like "a" and "the." Is this possible?
  #2  
Old November 13th, 2006, 09:46 PM posted to microsoft.public.excel.misc
Bob Phillips
external usenet poster
 
Posts: 5,994
Default How can I alphabetize data excluding words like "a" and "the"?

Create a helper column and strip leading The and A and An,

=Substitute(Substitute(Substitute(A1,"The ",""),"A ",""),"An","")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Faith" wrote in message
...
I'm cataloging a list of movies, and I'd like to be able to alphabetize

the
titles ignoring words like "a" and "the." Is this possible?



  #3  
Old November 13th, 2006, 09:47 PM posted to microsoft.public.excel.misc
Elkar
external usenet poster
 
Posts: 940
Default How can I alphabetize data excluding words like "a" and "the"?

Here's one option that might work for you. Let's say your titles are in
column A. Insert a new column B and enter this formula:

=IF(LEFT(A1,2)="a ",MID(A1,3,LEN(A1)),IF(LEFT(A1,4)="the
",MID(A1,5,LEN(A1)),A1))

Copy the formula down through column B as needed. Then, when you sort, sort
by column B. You can also hide column B if you want.

HTH,
Elkar


"Faith" wrote:

I'm cataloging a list of movies, and I'd like to be able to alphabetize the
titles ignoring words like "a" and "the." Is this possible?

  #4  
Old November 13th, 2006, 09:49 PM posted to microsoft.public.excel.misc
Dave F
external usenet poster
 
Posts: 2,722
Default How can I alphabetize data excluding words like "a" and "the"?

This is clever.
--
Brevity is the soul of wit.


"Elkar" wrote:

Here's one option that might work for you. Let's say your titles are in
column A. Insert a new column B and enter this formula:

=IF(LEFT(A1,2)="a ",MID(A1,3,LEN(A1)),IF(LEFT(A1,4)="the
",MID(A1,5,LEN(A1)),A1))

Copy the formula down through column B as needed. Then, when you sort, sort
by column B. You can also hide column B if you want.

HTH,
Elkar


"Faith" wrote:

I'm cataloging a list of movies, and I'd like to be able to alphabetize the
titles ignoring words like "a" and "the." Is this possible?

  #5  
Old November 13th, 2006, 09:49 PM posted to microsoft.public.excel.misc
James Silverton
external usenet poster
 
Posts: 181
Default How can I alphabetize data excluding words like "a" and "the"?

Hello, Faith!
You wrote on Mon, 13 Nov 2006 13:28:01 -0800:

F I'm cataloging a list of movies, and I'd like to be able to
F alphabetize the titles ignoring words like "a" and "the." Is
F this possible?

You probably could do this with VBA but, for a one off sort,
you could also make a helper column with "the " and "a "
replaced by "" and sort on that. It depends, I guess, whether
you intend to do it frequently.

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not

  #6  
Old November 11th, 2009, 05:25 PM posted to microsoft.public.excel.misc
val8rie
external usenet poster
 
Posts: 1
Default How can I alphabetize data excluding words like "a" and "the"?

That works, but if the first word of a movie without A, or AN or THE, starts
with any of those characters, this formula removes those first 1 - 3 letters.

IE: "Angels Among Us" in column A, becomes "gels Among Us" in the helper
column.

"Bob Phillips" wrote:

Create a helper column and strip leading The and A and An,

=Substitute(Substitute(Substitute(A1,"The ",""),"A ",""),"An","")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Faith" wrote in message
...
I'm cataloging a list of movies, and I'd like to be able to alphabetize

the
titles ignoring words like "a" and "the." Is this possible?




  #7  
Old November 11th, 2009, 05:50 PM posted to microsoft.public.excel.misc
Peo Sjoblom[_3_]
external usenet poster
 
Posts: 137
Default How can I alphabetize data excluding words like "a" and "the"?

No it doesn't, notice that there are spaces included

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"The ",""),"A ",""),"An ","")

So Angels will not be affected, of course if the movie's name is

"Together On A Sunday" and you are using a capital A before Sunday that will
be stripped but if that's the case one can add some more to it


=IF(LEFT(A1,2)="A ",SUBSTITUTE(A1,"A ",""),IF(LEFT(A1,3)="An
",SUBSTITUTE(A1,"An ",""),IF(LEFT(A1,4)="The ",SUBSTITUTE(A1,"The
","",1),A1)))

--


Regards,


Peo Sjoblom


"val8rie" wrote in message
...
That works, but if the first word of a movie without A, or AN or THE,
starts
with any of those characters, this formula removes those first 1 - 3
letters.

IE: "Angels Among Us" in column A, becomes "gels Among Us" in the helper
column.

"Bob Phillips" wrote:

Create a helper column and strip leading The and A and An,

=Substitute(Substitute(Substitute(A1,"The ",""),"A ",""),"An","")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Faith" wrote in message
...
I'm cataloging a list of movies, and I'd like to be able to alphabetize

the
titles ignoring words like "a" and "the." Is this possible?






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.