#1   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Sorting

With VBA:

Sub Sort()
Set Start = Range("a1")
Start.Offset(0, 1).EntireColumn.Insert Shift:=xlToRight
For Each c In Range(Start, Start.End(xlDown))
If UCase(Left(c, 3)) = "THE" Then
c.Offset(0, 1) = Mid(c, 5)
Else
c.Offset(0, 1) = c
End If
Next c
Start.CurrentRegion.Sort Key1:=Start.Offset(0, 1),
Order1:=xlAscending, Header:=xlGuess
Start.Offset(0, 1).EntireColumn.Delete
End Sub

http://cjoint.com/?cdrExzkMSs

JB
http://boisgontierjacques.free.fr/

On 31 jan, 18:34, Tomk wrote:
Does Excel 2007 have a built in way to sort a list of names and ignore "The"
in the title?
--
Tomk


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic sorting (giving max and min) based on custom sorting lis Joe Lewis[_2_] Excel Worksheet Functions 4 November 23rd 08 05:12 AM
Sorting S. Kissing Excel Discussion (Misc queries) 2 September 18th 08 12:38 AM
sorting Hitch1961 Excel Discussion (Misc queries) 2 September 16th 08 11:01 PM
Sorting VLookup vs Sorting SumProduct Lauren Excel Discussion (Misc queries) 1 August 21st 07 12:19 AM
Sorting: Sorting by the First Character dzuy Excel Discussion (Misc queries) 2 June 22nd 06 08:27 PM


All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"