Excel - How do I get Excel to ignore "a", "an", "the" when sorting?

Asked By Sedro on 28-Mar-09 05:54 PM
I am maintaining a large list of books.  They are customarily sorted by
ignoring the initial "A", "An", or "The" when these are the first words of a
title.  Is there a rule or macro that can tell Excel to ignore them in this
position?




GarysStuden replied on 28-Mar-09 07:09 PM
Here an implementation:

Sub ignore()
s1 = "A "
s2 = "An "
s3 = "The "
v = Range("A1").Value
If Left(v, 2) = s1 Then
v = Right(v, Len(v) - 2)
Else
If Left(v, 3) = s2 Then
v = Right(v, Len(v) - 3)
Else
If Left(v, 4) = s3 Then
v = Right(v, Len(v) - 4)
End If
End If
End If
MsgBox (v)
End Sub

--
Gary''s Student - gsnu200841