.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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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
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
It's just what the macro recorder records. You can ignore it if you're not sorting Chinese.
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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
Back
Top