电子表格中如何生成助记码
答案:1 悬赏:80 手机版
解决时间 2021-08-10 13:43
- 提问者网友:辞取
- 2021-08-10 10:45
要把A列的字生助记码 如A1:成龙 在B1中生成:cl
最佳答案
- 五星知识达人网友:北方的南先生
- 2021-08-10 11:34
用宏自定义函数吧。在Excel中同时按Alt和F11进入宏界面,点菜单的插入,模块,粘贴如下代码:
Function SZPY(tmpStr As String) As String
Dim i, j As Integer
j = Len(tmpStr)
For i = 1 To j
SZPY = SZPY & WorksheetFunction.VLookup(Mid(tmpStr, i, 1), _
[{"吖","a";"八","b";"嚓","c";"咑","d";"鵽","e";"发","f";"猤","g";"铪","h";" 夻","j";"咔","k";"垃","l";"嘸","m";"旀","n";"噢","o";"妑","p";"七","q";"囕","r";" 仨","s";"他","t";"屲","w";"夕","x";"丫","y";"帀","z"}], 2)
Next i
End Function
回到Excel,在B1输入 =SZPY(A1)
缺点,一些多音字不识别。
Function SZPY(tmpStr As String) As String
Dim i, j As Integer
j = Len(tmpStr)
For i = 1 To j
SZPY = SZPY & WorksheetFunction.VLookup(Mid(tmpStr, i, 1), _
[{"吖","a";"八","b";"嚓","c";"咑","d";"鵽","e";"发","f";"猤","g";"铪","h";" 夻","j";"咔","k";"垃","l";"嘸","m";"旀","n";"噢","o";"妑","p";"七","q";"囕","r";" 仨","s";"他","t";"屲","w";"夕","x";"丫","y";"帀","z"}], 2)
Next i
End Function
回到Excel,在B1输入 =SZPY(A1)
缺点,一些多音字不识别。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯