.SortMethod = xlPinYin?

gorem

Board Regular
Joined
Sep 28, 2013
Messages
188
Hi all,

Quick question. Most macros I've used that need to sort data alphabetically contain
Code:
[COLOR=#000000][FONT=Consolas].[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]SortMethod [/FONT][/COLOR][COLOR=#000000][FONT=Consolas]=[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] xlPinYin[/FONT][/COLOR]
. What exactly is xlPinYin?

I see this used all over forums, and it has always worked well for me in the past, but I'd love to know if there are any particular idiosyncrasies surrounding it.

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,836
Office Version
  1. 2010
Platform
  1. Windows
It's used for sorting chinese characters. You need not use it.

SortMethodType: Microsoft.Office.Interop.Excel.XlSortMethod

The type of sort. Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

Can be one of the following XlSortMethod values:

xlStroke. Sorting by the quantity of strokes in each character.

xlPinYin. Phonetic Chinese sort order for characters.
 
Last edited:
Upvote 0

gorem

Board Regular
Joined
Sep 28, 2013
Messages
188
Thanks for the reply! I should clarify - I did know that it was used for sorting chinese characters, however I almost always see it applied to alphabetical sorting macros (in English). Is there an alternative sortmethod i should use, or should i leave that attribute blank? Thanks again for the help.
 
Upvote 0

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,836
Office Version
  1. 2010
Platform
  1. Windows
It's just what the macro recorder records. You can ignore it if you're not sorting Chinese.
 
Upvote 0

Forum statistics

Threads
1,195,960
Messages
6,012,559
Members
441,710
Latest member
needhelp_please

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top