Turn from: http://jingyan.baidu.com/article/63acb44adca44461fcc17e85.html to: http://jingyan.baidu.com/article/ F79b7cb3a577689144023ef0.html
Subxx () fori =2 to[A65536]. End (3). Row Cells (i,2). Value = getpy (Cells (i,1). Value)NextIEnd SubFunctionPinyin (P as String) as StringI=ASC(P)Select CaseI Case-20319 to-20284: Pinyin ="A" Case-20283 to-19776: Pinyin ="B" Case-19775 to-19219: Pinyin ="C" Case-19218 to-18711: Pinyin ="D" Case-18710 to-18527: Pinyin ="E" Case-18526 to-18240: Pinyin ="F" Case-18239 to-17923: Pinyin ="G" Case-17922 to-17418: Pinyin ="H" Case-17417 to-16475: Pinyin ="J" Case-16474 to-16213: Pinyin ="K" Case-16212 to-15641: Pinyin ="L" Case-15640 to-15166: Pinyin ="M" Case-15165 to-14923: Pinyin ="N" Case-14922 to-14915: Pinyin ="O" Case-14914 to-14631: Pinyin ="P" Case-14630 to-14150: Pinyin ="Q" Case-14149 to-14091: Pinyin ="R" Case-14090 to-13319: Pinyin ="S" Case-13318 to-12839: Pinyin ="T" Case-12838 to-12557: Pinyin ="W" Case-12556 to-11848: Pinyin ="X" Case-11847 to-11056: Pinyin ="Y" Case-11055 to-2050: Pinyin ="Z" Case Else: Pinyin =PEnd Select End Function FunctionGetpy (Str) as String DimResult as String fori =1 to Len(Str) Result= result & Pinyin (Mid(StrI1)) NextI getpy=resultEnd Function
Go Excel to take Chinese pinyin first