2024年11月中文转拼音怎么转?Excel快速将中文转成拼音的操作方法

 更新时间:2024-11-17

  ⑴中文转拼音怎么转?当我们想要把很多中文汉子的拼音全部进行转换,一个一个字的手动转换不仅速度慢,而且容易出错的概率非常高,于是呢小编就给大家带来了通过Excel表格来快速将中文转换成汉子的方法,有需要的用户一起和winwin往下看吧!

  ⑵打开Excel->工具->宏->Viaual Basic编辑器;

  ⑶在弹出来的窗口中对着VBAproject点右键->插入->模块

  ⑷此时下面会出现一个名为"模块"点击它,然后在右边的空白栏中粘贴以下内容:

  ⑸Function getpychar(char)

  ⑹tmp = + Asc(char)

  ⑺If (tmp >= And tmp <= 45252) Then

  ⑻getpychar = "A"

  ⑼ElseIf (tmp >= And tmp <= 45760) Then

  ⑽getpychar = "B"

  ⑾ElseIf (tmp >= And tmp <= 46317) Then

  ⑿getpychar = "C"

  ⒀ElseIf (tmp >= And tmp <= 46825) Then

  ⒁getpychar = "D"

  ⒂ElseIf (tmp >= And tmp <= 47009) Then

  ⒃getpychar = "E"

  ⒄ElseIf (tmp >= And tmp <= 47296) Then

  ⒅getpychar = "F"

  ⒆ElseIf (tmp >= And tmp <= 47613) Then

  ⒇getpychar = "G"

  ⒈ElseIf (tmp >= And tmp <= 48118) Then

  ⒉getpychar = "H"

  ⒊ElseIf (tmp >= And tmp <= 49061) Then

  ⒋getpychar = "J"

  ⒌ElseIf (tmp >= And tmp <= 49323) Then

  ⒍getpychar = "K"

  ⒎ElseIf (tmp >= And tmp <= 49895) Then

  ⒏getpychar = "L"

  ⒐ElseIf (tmp >= And tmp <= 50370) Then

  ⒑getpychar = "M"

  ⒒ElseIf (tmp >= And tmp <= 50613) Then

  ⒓getpychar = "N"

  ⒔ElseIf (tmp >= And tmp <= 50621) Then

  ⒕getpychar = "O"

  ⒖ElseIf (tmp >= And tmp <= 50905) Then

  ⒗getpychar = "P"

  ⒘ElseIf (tmp >= And tmp <= 51386) Then

  ⒙getpychar = "Q"

  ⒚ElseIf (tmp >= And tmp <= 51445) Then

  ⒛getpychar = "R"

  ①ElseIf (tmp >= And tmp <= 52217) Then

  ②getpychar = "S"

  ③ElseIf (tmp >= And tmp <= 52697) Then

  ④getpychar = "T"

  ⑤ElseIf (tmp >= And tmp <= 52979) Then

  ⑥getpychar = "W"

  ⑦ElseIf (tmp >= And tmp <= 53640) Then

  ⑧getpychar = "X"

  ⑨ElseIf (tmp >= And tmp <= 54480) Then

  ⑩getpychar = "Y"

  ⅠElseIf (tmp >= And tmp <= ) Then

  Ⅱgetpychar = "Z"

  ⅢElse '如果不是中文,则不处理

  Ⅳgetpychar = char

  ⅤEnd Function

  ⅥFunction getpy(str)

  ⅦFor i = To Len(str)

  Ⅷgetpy = getpy & getpychar(Mid(str, i, ))

  ⅨEnd Function

  Ⅹ现在转换函数已编写完成!关掉此编缉的窗口。要在Excel中使用,方法如下:

  ㈠中国 =getpy(A)

  ㈡以上便是winwin小编给大家分享介绍的Excel快速将中文转成拼音的操作方法,有需要的用户快去试试吧!

  ㈢EXCEL怎么删除所有空行?EXCEL一次删除所有空行方法

  ㈣Office文档中的超链接无法打开怎么办?修复Outlook/Excel/Word超链接打不开

您可能感兴趣的文章:

相关文章