Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a formula or other way to sort excluding the and a and an

Status
Not open for further replies.

buzfar

Technical User
Jun 12, 2006
40
0
0
US
Hello there;

This site has always been there for me on the InDesign side, and now I have found this. I am in need of a way to sort an excel document.

I have a listing of book titles, over 1200 books, and need to sort on the title, but omit "the" "a" and "an" if the title begins with these three words. Is there a formula or another way out there to enable me to do this?

Thank you so much for you help!

Allene
 
You could just use a nested If function in an adjacent cell, fill the formula down for all records, then sort on that column.

=IF(LEFT(A2, 2) = "a ", MID(A2, 3, 999), IF(LEFT(A2,3) = "an ", MID(A2, 4, 999), IF(LEFT(A2, 4)="the ",MID(A2, 5, 999), A2)))



[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 



Variation, on a theme...
[tt]
=IF(OR(LEFT(A2,2)="A ",LEFT(A2,3)="An ",LEFT(A2,4)="The "),RIGHT(A2,LEN(A2)-FIND(" ",A2)),A2)
[/tt]
[sub]I never got thru all of Carnival of Venice.[/sub]

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top