當前位置:首頁 » 表格製作 » 表格製作怎樣用宏彈出拼音
擴展閱讀
怎樣讓excel表格字往下排 2024-11-25 21:13:13

表格製作怎樣用宏彈出拼音

發布時間: 2024-07-26 01:33:23

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)