EXCEL漢字轉拼音怎麼轉,excel怎麼把漢字轉換成拼音

2021-10-06 10:59:27 字數 4120 閱讀 1643

1樓:百度文庫精選

內容來自使用者:微力試卷

篇一:exel**漢字轉換成拼音的方法  excel中把漢字變成拼音的方法:  例圖:

  1.啟動excel20xx(其它版本請仿照操作),開啟相應的工作表;  2.執行「工具(開發工具)→巨集→visualbasic編輯器」命令(或者直接按「alt+f11」組合鍵),進入visualbasic編輯狀態;  3.

執行「插入→模組」命令,插入一個新模組。再雙擊插入的模組,進入模組**編輯狀態;  4.將**輸入其中;  5.

**輸入完成後,關閉visualbasic編輯視窗,返回excel編輯狀態;  6.自定義函式就可以用了,如:選中a2單元格,輸入公式:

=pinyin(a1),即可出現拼音樣式。  ps、以office20xx版本為例,若找不到「開發工具選項」,則在按鈕中找到「excel選項」-「常用」-「再功能區顯示開發工具選項卡」-確定。  另外,巨集的設定,也是在該按鈕中找到「excel選項」-「信任中心」-「信任中心設定」-「巨集設定」-「啟用所有巨集」-確定。

  這樣就沒問題了。  **如下。  functionpinyin(hzasstring)  dimpinmaasstring  dimmypinmaasvariant  dimtempasinteger,iasinteger,jasinteger  pinma="a,20319,ai,20317,an,20304,ang,20295,ao,20292,"  pinma=pinma&"ba,20283,bai,20265,ban,20257,bang,20242,bao,20230,bei,20xx1,ben,20xx6,beng,20xx2,bi,20xx6  ,bian,20002,biao,19990,bie,19986,bin,19982,bing,19976,bo,19805,bu,19784,"

2樓:

建議你複製到word中,word中專門有一個按鈕可以直接轉化為拼音。轉化完後,再複製到excel中即可

3樓:

excel應該是沒有這個功能的。

excel怎麼把漢字轉換成拼音

4樓:魚木混豬喲

excel中可以利用自定義函式來實現將漢字轉換成拼音。

所用工具:office2007

舉例說明如下:

1.將a列資料轉換成拼音:

2.alt+f11插入模組,在模組中輸入如下**,**很多(由於篇幅限制,無法將全部**發上來,可以搜尋漢字asc碼來獲取),但原理很簡單,利用每個漢字的asc碼來得到這個漢字的拼音,然後依次提取單元格中的每一個漢字,分別獲得其拼音。

function pinyin(p as string) as string

i = asc(p)

select case i

case -20319 to -20318: pinyin = "a "

case -20317 to -20305: pinyin = "ai "

case -20304 to -20296: pinyin = "an "

case -20295 to -20293: pinyin = "ang "

case -20292 to -20284: pinyin = "ao "

case -20283 to -20266: pinyin = "ba "

case -20265 to -20258: pinyin = "bai "

case -20257 to -20243: pinyin = "ban "

case -20242 to -20231: pinyin = "bang "

case -20230 to -20052: pinyin = "bao "

case -20051 to -20037: pinyin = "bei "

case -20036 to -20033: pinyin = "ben "

case -20032 to -20027: pinyin = "beng "

case -20026 to -20003: pinyin = "bi "

case -20002 to -19991: pinyin = "bian "

case -19990 to -19987: pinyin = "biao "

case -19986 to -19983: pinyin = "bie "

case -11055 to -11053: pinyin = "za "

case -11052 to -11046: pinyin = "zai "

case -11045 to -11042: pinyin = "zan "

case -11041 to -11039: pinyin = "zang "

case -11038 to -11025: pinyin = "zao "

case -11024 to -11021: pinyin = "ze "

case -11020 to -11020: pinyin = "zei "

case -11019 to -11019: pinyin = "zen "

case -11018 to -11015: pinyin = "zeng "

case -11014 to -10839: pinyin = "zha "

case -10838 to -10833: pinyin = "zhai "

case -10832 to -10816: pinyin = "zhan "

case -10815 to -10801: pinyin = "zhang "

case -10800 to -10791: pinyin = "zhao "

case -10790 to -10781: pinyin = "zhe "

case -10780 to -10765: pinyin = "zhen "

case -10764 to -10588: pinyin = "zheng "

case -10587 to -10545: pinyin = "zhi "

case -10544 to -10534: pinyin = "zhong "

case -10533 to -10520: pinyin = "zhou "

case -10519 to -10332: pinyin = "zhu "

case -10331 to -10330: pinyin = "zhua "

case -10329 to -10329: pinyin = "zhuai "

case -10328 to -10323: pinyin = "zhuan "

case -10322 to -10316: pinyin = "zhuang "

case -10315 to -10310: pinyin = "zhui "

case -10309 to -10308: pinyin = "zhun "

case -10307 to -10297: pinyin = "zhuo "

case -10296 to -10282: pinyin = "zi "

case -10281 to -10275: pinyin = "zong "

case -10274 to -10271: pinyin = "zou "

case -10270 to -10263: pinyin = "zu "

case -10262 to -10261: pinyin = "zuan "

case -10260 to -10257: pinyin = "zui "

case -10256 to -10255: pinyin = "zun "

case -10254 to -10254: pinyin = "zuo "

case else: pinyin = p

end select

end function

function py(str)

for i = 1 to len(str)

py = py & pinyin(mid(str, i, 1))

next i

end function

3.這樣,返回excel利用自定義的py函式即可:

4.下拉填充,就可以得到全部漢字的拼音:

漢字轉拼音 VB問題,VB漢字轉拼音!!緊急!!

這個問題比較複雜,你輸入一個人的姓名,拼音要將姓和名自動分開,這還要去判斷單姓和複姓,沒那麼簡單,如果輸入時自己分開最好。我有一個excel版的程式,也是公司用來將姓名轉成拼音的,其中也遇到你說的要將姓名的姓與名分開,不過這一步是在excel中進行,vba中沒有寫這 發給你看看先。可倒是可以,不過還...

轉的拼音什麼打,轉動的「轉」的讀音是什麼?

zhu n 1.遷徙 流亡 老弱 乎溝壑。2.不直接的,中間再經過別人或別的地方 送。達。發。運。周 3.改換方向 彎。向左 4.改變位置 移。5.改變形勢 情況 敗為勝。天氣 睛。病情好 zhu n 1.旋 車輪飛 2.使旋 動地球儀。3.圍繞著一箇中心運動 越陷越深繞著太陽 4.量詞,旋轉一圈為...

excel home論壇 excel 行列轉置的巨集 例如

沒看懂lz的意思。是要把這兩行五列的內容合併在一起嗎?還是要把這兩行五列的內容放到一行去?麻煩lz把問題說清楚一點,這樣也方便別人解答。for 迴圈就可以解決你的問題。假如 a列 q 1 2 3 4 b列 w 5 6 7 8 那麼c列 q 1 2 3 4 w 5 6 7 8 以下 就可以解決你的問題...