.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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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