How do I sort Mac and Mc together alphabetically?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wish to sort a list of names alphabetically in access. How do I keep names
Starting with Mac and Mc together or sequential?
 
I wish to sort a list of names alphabetically in access. How do I keep names
Starting with Mac and Mc together or sequential?

Could you give an example of such a list? I'd suggest just sorting the
LastName field alphabetically; all the Mac names (including non-Celtic
names like Mach, Machado, Macciato, etc.) will sort together, as will
all the Mc names. What would you want that's different?


John W. Vinson[MVP]
 
Could you give an example of such a list? I'd suggest just sorting the
LastName field alphabetically; all the Mac names (including non-Celtic
names like Mach, Machado, Macciato, etc.) will sort together, as will
all the Mc names. What would you want that's different?

McFarlane to follow immediately after MacFarlane, McLeod with MacLeod

McLeod, Paul
MacLeod, Peter
McLeod, Petronella
MacLeod, Pricsilla
 
McFarlane to follow immediately after MacFarlane, McLeod with MacLeod

McLeod, Paul
MacLeod, Peter
McLeod, Petronella
MacLeod, Pricsilla

Please sort the following names into correct order then:

MacGee
McGee
Mach
Machado
MacHeath
McHeath
Machinery

That quibble aside: use this calculated field for sorting.

SortName: IIF(Left([LastName], 3) = "Mac", "Mc" & Mid([LastName], 4),
[LastName])

This will sort all the Mc and all the Mac names as if they were Mc but
display them as entered. Note that non-patronymic names which happen
to begin with the letters "Mac" will be sorted incorrectly, but that's
what you're asking for.

John W. Vinson[MVP]
 
McFarlane to follow immediately after MacFarlane, McLeod with MacLeod

McLeod, Paul
MacLeod, Peter
McLeod, Petronella
MacLeod, Pricsilla

Please sort the following names into correct order then:

MacGee
McGee
Mach
Machado
MacHeath
McHeath
Machinery

That quibble aside: use this calculated field for sorting.

SortName: IIF(Left([LastName], 3) = "Mac", "Mc" & Mid([LastName], 4),
[LastName])

This will sort all the Mc and all the Mac names as if they were Mc but
display them as entered. Note that non-patronymic names which happen
to begin with the letters "Mac" will be sorted incorrectly, but that's
what you're asking for.

It wasn't what I was asking for, I was simply clarifying what someone else was
asking for.

I think it would probably be better to sort Mc under Mac for the reasons you
mentioned. There are several names beginning with Mac that are not Scottish or
Irish patronymics, but names in their own right -- Machanic, Machin and the
like. These should not be sorted as Mc (and how does a program tell the
difference, unless you specify the the letter after c must be uppercase -- but
then what do you so with Macmillan, as in the publishers? There are not many
other names that begin with Mc.
 
I would like the following sort:

McLean
MacLean
McLennon
MacLeath
Mcloud
etc
i.e Mac and Mc are treated as the same - this is what our local phone book
does
Thanks anyway
 
Thanks - that is what I was asking for...
I do not have any subscribers called "machinery" or mach etc

John Vinson said:
McFarlane to follow immediately after MacFarlane, McLeod with MacLeod

McLeod, Paul
MacLeod, Peter
McLeod, Petronella
MacLeod, Pricsilla

Please sort the following names into correct order then:

MacGee
McGee
Mach
Machado
MacHeath
McHeath
Machinery

That quibble aside: use this calculated field for sorting.

SortName: IIF(Left([LastName], 3) = "Mac", "Mc" & Mid([LastName], 4),
[LastName])

This will sort all the Mc and all the Mac names as if they were Mc but
display them as entered. Note that non-patronymic names which happen
to begin with the letters "Mac" will be sorted incorrectly, but that's
what you're asking for.

John W. Vinson[MVP]
 
Thanks - that is what I was asking for...
I do not have any subscribers called "machinery" or mach etc

Mach is a perfectly ordinary German name. Machado is a rather common
name in the Hispanic community. There are LOTS of perfectly ordinary
names which begin with the letters mac which are not Scottish
patronymics. You might not happen to have any subscribers in that
category now, but what will you do if someone with such a name
subscribes? Reject them? Change the spelling of their name? Or sort it
with the Mc names?

I simply do NOT see what benefit you accrue from such a nonstandard
sorting! Would a subscriber named MacLaren really object to being in
an alphabetical list, or would the really prefer to be next to
McLaren? Why do you feel this is needed!?


John W. Vinson[MVP]
 
I simply do NOT see what benefit you accrue from such a nonstandard
sorting! Would a subscriber named MacLaren really object to being in
an alphabetical list, or would the really prefer to be next to
McLaren? Why do you feel this is needed!?

It was the standard way of sorting Mac- names since time immemorial;
makes eyeball searches easier if you don't know whether you're looking
for a McGuiness, MacGuiness, M‘Guiness or whatever. Works well if the
list is being sorted by a Scot, less well if by a computer that thinks
MacH is a clan of German scientists!
 
Works well if the
list is being sorted by a Scot, less well if by a computer that thinks
MacH is a clan of German scientists!

<g> Not to mention by a computer that thinks it's a member of the
ancient and honorable Clan MacHinery (tartan of silicon-grey with fine
gold lines)...

John W. Vinson[MVP]
 
Back
Top