A. EXCEL涓镐庝箞鎶婃眽瀛楄浆鎴愭嫾阔筹纻
镓揿紑Excel->宸ュ叿->瀹->Viaual Basic缂栬緫鍣
鍦ㄥ脊鍑烘潵镄勭獥鍙d腑瀵圭潃VBAproject镣瑰彸阌->鎻掑叆->妯″潡
涓嬮溃浼氩嚭鐜颁竴涓钖崭负"妯″潡1"锛岀偣鍑
鍦ㄥ彸杈圭殑绌虹槠镙忎腑绮樿创浠ヤ笅鍐呭癸细
Function pinyin(p As String) As String
i = Asc(p)
Select Case i
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 = p
End Select
End Function
Function getpy(str)
For i = 1 To Len(str)
getpy = getpy & pinyin(Mid(str, i, 1))
Next i
End Function
********澶嶅埗鍒版ょ粨𨱒,链琛屼笉澶嶅埗*******
鐜板湪杞鎹㈠嚱鏁板凡缂栧啓瀹屾垚!鍏虫帀姝ょ紪缂夌殑绐楀彛銆
B. excel琛ㄦ牸涓镐庢牱鐢ㄦ妸濮揿悕镄勬嫾阔崇涓涓瀛楁瘝鍦ㄤ竴鍒椾腑鏄剧ず鍑烘潵
Excel
镊瀹氢箟鍑芥暟鏂规硶锛
1.
钖锷
Excel 2003
锛埚叾瀹幂増链璇蜂豢镦ф搷浣滐级
锛屾墦寮鐩稿簲镄勫伐浣滆〃锛
2.
镓ц屸滃伐鍏封啋瀹忊啋
Visual Basic
缂栬緫鍣ㄢ濆懡浠わ纸鎴栬呯洿鎺ユ寜钬
Alt+F11
钬濈粍钖堥敭锛
锛岃繘鍏
Visual Basic
缂栬緫鐘舵侊绂
3.
镓ц屸沧彃鍏モ啋妯″潡钬濆懡浠わ纴鎻掑叆涓涓鏂版ā鍧椼傚啀鍙屽嚮鎻掑叆镄勬ā鍧楋纴杩涘叆妯″潡浠g爜缂栬緫
鐘舵侊绂
4.
灏嗕唬镰佽緭鍏ュ叾涓锛
5.
浠g爜杈揿叆瀹屾垚钖庯纴鍏抽棴
V
isual Basic
缂栬緫绐楀彛锛岃繑锲
Excel
缂栬緫鐘舵侊绂
6.
镊瀹氢箟鍑芥暟灏卞彲浠ョ敤浜嗭纴濡傦细阃変腑
D2
鍗曞厓镙硷纴杈揿叆鍏寮忥细
=getpy(A2)
銆