当前位置:首页 > 日记 > 正文

获取wps中汉字首字母 | wps表格获取字词对应的第一个字母

获取wps中汉字首字母 | wps表格获取字词对应的第一个字母

1.wps表格如何获取字词对应的第一个字母

预览该模板: 在日常工作过程中,我们常需要获取汉字对应的第一个字母,比如,学生用音序查字法查字词典,医院建立药品查询系统,KTV建立歌曲查询系统……有没有办法轻松获取字词的第一个字母呢?大家都知道ET和EXCLE可以按音序排列中文数据,这就表明电子表格已经能洞悉汉字拼音的第一个字母与其在汉字编码系统的位置的关系了。

只要查询出汉字在编码系统中的位置,并告知相同音序的汉字在编码中的起始位置,电子表格就可以将汉字的音序轻松获取。想三秒钟获取汉字对应的第一个字母就打开你的WPS表格2012,跟我试试吧!一、打开原始工作簿,在准备填充字母的列粘贴下列嵌套公式: =LOOKUP(CODE(A2),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"}) 在这个公式中,CODE函数旨在查询词语(字符串)第一个字符对应的数字代码,这些代码其实标明了这个汉字在代码库中的具体排位,LOOKP函数就根据不同音序汉字在代码库中的起始位置,获取到这个汉字的第一个字母了。

其中,A2是引用汉语字词所在的单元格名称,大家可获取字词前两个汉字所对应的第一个字母根据实际情况修改。二、如果你想获取词语第二个汉字对应的字母,可以将上述公式中的A2改为MID(A2,2,1),表示从字符串的第二个开始取的第一个,即第二个。

具体公式为:=LOOKUP(CODE(MID(A2,2,1)),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"}) 如果想取第三个可以以此类推,即: =LOOKUP(CODE(MID(A2,3,1)),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"}) 三、如果想获取前两个汉字音序怎么办?用“&”将获取第一、二个汉字音序的公式合并即可。如果想获取前三个汉字音序就用“&”将获取第一、二、三个汉字音序的公式合并。

获取字符串前三个汉字音序的公式: =LOOKUP(CODE(A2),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})&LOOKUP(CODE(MID(A2,2,1)),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})&LOOKUP(CODE(MID(A2,3,1)),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})。

2.WPS表格如何获取字词对应的第一个字母

一、打开原始工作簿,在准备填充字母的列粘贴下列嵌套公式:=LOOKUP(CODE(A2),45217 {0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})在这个公式中,CODE函数旨在查询词语(字符串)第一个字符对应的数字代码,这些代码其实标明了这个汉字在代码库中的具体排位,LOOKP函数就根据不同音序汉字在代码库中的起始位置,获取到这个汉字的第一个字母了。

其中,A2是引用汉语字词所在的单元格名称,大家可获取字词前两个汉字所对应的第一个字母根据实际情况修改。二、如果你想获取词语第二个汉字对应的字母,可以将上述公式中的A2改为MID(A2,2,1),表示从字符串的第二个开始取的第一个,即第二个。

具体公式为:=LOOKUP(CODE(MID(A2,2,1)),45217 {0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})如果想取第三个可以以此类推,即:=LOOKUP(CODE(MID(A2,3,1)),45217 {0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})三、如果想获取前两个汉字音序怎么办?用“&”将获取第一、二个汉字音序的公式合并即可。 如果想获取前三个汉字音序就用“&”将获取第一、二、三个汉字音序的公式合并。

获取字符串前三个汉字音序的公式:=LOOKUP(CODE(A2),45217 {0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})&LOOKUP(CODE(MID(A2,2,1)),45217 {0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})&LOOKUP(CODE(MID(A2,3,1)),45217 {0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})。

3.提取表格中文字的首字母

你先用函数mid提取中文文字,再通过我找的别人提取中文字首字母的方法

先定义名称:插入-名称-定义

拼音={"","";"吖","A";"八","B";"嚓","C";"咑","D";"鵽","E";"发","F";"猤","G";"铪","H";"夻","J";"咔","K";"垃","L";"呒","M";"旀","N";"噢","O";"妑","P";"七","Q";"囕","R";"仨","S";"他","T";"屲","W";"夕","X";"丫","Y";"帀","Z"}

假设你的文字在A列第一行,B1写公式:

=VLOOKUP(LEFT(A1),拼音,2)&VLOOKUP(MID(A1,2,1),拼音,2)&VLOOKUP(MID(A1,3,1),拼音,2)&VLOOKUP(MID(A1,4,1),拼音,2)&VLOOKUP(MID(A1,5,1),拼音,2)&VLOOKUP(MID(A1,6,1),拼音,2)&VLOOKUP(MID(A1,7,1),拼音,2)&VLOOKUP(MID(A1,8,1),拼音,2)

这个公式可以取得前8的首字母,你可以根据实际需要修改。

最后100p和刚才的结果用&;连续一下。

4.怎样获取汉字的首字母

后面又提的问题,手工做只需选中ZGHT6Ha这一列复制,再另一列选择性粘贴->数值,再改就行了。

下面是一个VBA自定义函数,按ALT+F11,插入模块,在右面窗口中粘贴下面代码。若B10内容为 中国航天6号a,则在某空白格中输入:=hztopy(B10) 即可Function hztopy(hzpy As String) As String Dim hzstring As String, pystring As String Dim hzpysum As Integer, hzi As Integer, hzpyhex As Integer hzstring = Trim(hzpy) hzpysum = Len(Trim(hzstring)) pystring = "" For hzi = 1 To hzpysum hzpyhex = "&H" + Hex(Asc(Mid(hzstring, hzi, 1))) Select Case hzpyhex Case &HB0A1 To &HB0C4: pystring = pystring + "A" Case &HB0C5 To &HB2C0: pystring = pystring + "B" Case &HB2C1 To &HB4ED: pystring = pystring + "C" Case &HB4EE To &HB6E9: pystring = pystring + "D" Case &HB6EA To &HB7A1: pystring = pystring + "E" Case &HB7A2 To &HB8C0: pystring = pystring + "F" Case &HB8C1 To &HB9FD: pystring = pystring + "G" Case &HB9FE To &HBBF6: pystring = pystring + "H" Case &HBBF7 To &HBFA5: pystring = pystring + "J" Case &HBFA6 To &HC0AB: pystring = pystring + "K" Case &HC0AC To &HC2E7: pystring = pystring + "L" Case &HC2E8 To &HC4C2: pystring = pystring + "M" Case &HC4C3 To &HC5B5: pystring = pystring + "N" Case &HC5B6 To &HC5BD: pystring = pystring + "O" Case &HC5BE To &HC6D9: pystring = pystring + "P" Case &HC6DA To &HC8BA: pystring = pystring + "Q" Case &HC8BB To &HC8F5: pystring = pystring + "R" Case &HC8F6 To &HCBF9: pystring = pystring + "S" Case &HCBFA To &HCDD9: pystring = pystring + "T" Case &HEDC5: pystring = pystring + "T" Case &HCDDA To &HCEF3: pystring = pystring + "W" Case &HCEF4 To &HD1B8: pystring = pystring + "X" Case &HD1B9 To &HD4D0: pystring = pystring + "Y" Case &HD4D1 To &HD7F9: pystring = pystring + "Z" Case Else pystring = pystring + Mid(hzstring, hzi, 1) End Select Next hztopy = pystringEnd Function。

5.EXCEL 怎么提取单元格汉字首字母

在EXECL中 ,按ALT+F11,插入---模块 复制下列代码 :

Function hztopy(hzpy As String) As String

Dim hzstring As String, pystring As String

Dim hzpysum As Integer, hzi As Integer, hzpyhex As Integer

hzstring = Trim(hzpy)

hzpysum = Len(Trim(hzstring))

pystring = ""

For hzi = 1 To hzpysum

hzpyhex = "&H" + Hex(Asc(Mid(hzstring, hzi, 1)))

Select Case hzpyhex

Case &HB0A1 To &HB0C4: pystring = pystring + "A"

Case &HB0C5 To &HB2C0: pystring = pystring + "B"

Case &HB2C1 To &HB4ED: pystring = pystring + "C"

Case &HB4EE To &HB6E9: pystring = pystring + "D"

Case &HB6EA To &HB7A1: pystring = pystring + "E"

Case &HB7A2 To &HB8C0: pystring = pystring + "F"

Case &HB8C1 To &HB9FD: pystring = pystring + "G"

Case &HB9FE To &HBBF6: pystring = pystring + "H"

Case &HBBF7 To &HBFA5: pystring = pystring + "J"

Case &HBFA6 To &HC0AB: pystring = pystring + "K"

Case &HC0AC To &HC2E7: pystring = pystring + "L"

Case &HC2E8 To &HC4C2: pystring = pystring + "M"

Case &HC4C3 To &HC5B5: pystring = pystring + "N"

Case &HC5B6 To &HC5BD: pystring = pystring + "O"

Case &HC5BE To &HC6D9: pystring = pystring + "P"

Case &HC6DA To &HC8BA: pystring = pystring + "Q"

Case &HC8BB To &HC8F5: pystring = pystring + "R"

Case &HC8F6 To &HCBF9: pystring = pystring + "S"

Case &HCBFA To &HCDD9: pystring = pystring + "T"

Case &HEDC5: pystring = pystring + "T"

Case &HCDDA To &HCEF3: pystring = pystring + "W"

Case &HCEF4 To &HD1B8: pystring = pystring + "X"

Case &HD1B9 To &HD4D0: pystring = pystring + "Y"

Case &HD4D1 To &HD7F9: pystring = pystring + "Z"

Case Else

pystring = pystring + Mid(hzstring, hzi, 1)

End Select

Next

hztopy = pystring

End Function

比如在A1输入 小燕子耳坠子7.8 则在其他空白单元格输入 =hztopy(A1) 回车执行即可.

6.excel中如何实现提取汉字的拼音首字母

在EXECL中 ,按ALT+F11,插入---模块 复制下列代码 :Function hztopy(hzpy As String) As StringDim hzstring As String, pystring As StringDim hzpysum As Integer, hzi As Integer, hzpyhex As Integerhzstring = Trim(hzpy)hzpysum = Len(Trim(hzstring))pystring = ""For hzi = 1 To hzpysum hzpyhex = "&H" + Hex(Asc(Mid(hzstring, hzi, 1))) Select Case hzpyhex Case &HB0A1 To &HB0C4: pystring = pystring + "A" Case &HB0C5 To &HB2C0: pystring = pystring + "B" Case &HB2C1 To &HB4ED: pystring = pystring + "C" Case &HB4EE To &HB6E9: pystring = pystring + "D" Case &HB6EA To &HB7A1: pystring = pystring + "E" Case &HB7A2 To &HB8C0: pystring = pystring + "F" Case &HB8C1 To &HB9FD: pystring = pystring + "G" Case &HB9FE To &HBBF6: pystring = pystring + "H" Case &HBBF7 To &HBFA5: pystring = pystring + "J" Case &HBFA6 To &HC0AB: pystring = pystring + "K" Case &HC0AC To &HC2E7: pystring = pystring + "L" Case &HC2E8 To &HC4C2: pystring = pystring + "M" Case &HC4C3 To &HC5B5: pystring = pystring + "N" Case &HC5B6 To &HC5BD: pystring = pystring + "O" Case &HC5BE To &HC6D9: pystring = pystring + "P" Case &HC6DA To &HC8BA: pystring = pystring + "Q" Case &HC8BB To &HC8F5: pystring = pystring + "R" Case &HC8F6 To &HCBF9: pystring = pystring + "S" Case &HCBFA To &HCDD9: pystring = pystring + "T" Case &HEDC5: pystring = pystring + "T" Case &HCDDA To &HCEF3: pystring = pystring + "W" Case &HCEF4 To &HD1B8: pystring = pystring + "X" Case &HD1B9 To &HD4D0: pystring = pystring + "Y" Case &HD4D1 To &HD7F9: pystring = pystring + "Z" Case Else pystring = pystring + Mid(hzstring, hzi, 1) End SelectNexthztopy = pystringEnd Function 比如在A1输入 小燕子耳坠子7.8 则在其他空白单元格输入 =hztopy(A1) 回车执行即可.。

相关文章

wps共享表格插入批注 | wps的表格

wps共享表格插入批注 | wps的表格

显示,修改,用户名,插入图片,教程,1.wps的表格中,如何插入图片批注原发布者:微力图文篇一:经典wps表格教程技巧100例 wps表格技巧 100例 目录 一、基本方法。。。。。。。。。。。。。.71.快速获取帮助,学习实用教程。。。。。。。..72.快速选…

ppt美化大师用于wps | wpsppt美化

ppt美化大师用于wps | wpsppt美化

教程,用于,大师,演示,一键,1.wps ppt美化大师怎么用一、工具:wps PPT美化大师、电脑二、操作步骤:【1】PPT美化大师程序的获得:直接在百度中搜索“PPT美化大师”,并从搜索结果列表中点击第一项即可进入对应官方。然后呢PPT美化大师的安装操作非…

r把居中放进wps | wps2010里插入使

r把居中放进wps | wps2010里插入使

插入图片,教程,放进,图片,wps,1.wps2010里插入图片如何使图片居中啊wps2010里插入图片使图片居中的方法如下:1、首先,打开“WPS文字“,新建一个空白文档。然后,点击左上角的”WPS文字“右边的小箭头,在出现的下拉菜单中,点击“插入”,然后再出现下…

wps给下面加字 | wps在里面加文字

wps给下面加字 | wps在里面加文字

文字,教程,图片,在里面,上加,1.wps在图片里面加文字将图片复制到WPS中,或者选择插入>图片。请点击输入图片描述如图所示,点击插入>文本框>横向。在文本框中输入“德天瀑布”,选中这四个字,根据需要设置字体类型、大小和颜色。请点击输入图片描…

wpsexcel设目录 | wps自动生成目录

wpsexcel设目录 | wps自动生成目录

自动生成,操作方法,索引,教程,目录,1.wps怎么自动生成目录 wps自动生成目录操作方法需要的软件 WPS或者EXCEL原因:为了让表格更加系统化,所以有些人设计了目录操作方法如下:1.在表格中通过合并居中 等一些简单操作,把页面做出来,如图2.在第一章…

wps取点文字阴影 | 把wps文档中字

wps取点文字阴影 | 把wps文档中字

字体,文字,文档,自动生成,设置,1.怎么把wps文档中字体的阴影去掉在WPS OFFICE文字中,关于字体的设置都能在“字体”对话框中找到。阴影的解决方法:选中文字,选择“开始”——“字体”组的“更多”——将阴影前的复选框取消。(如果半选中状态,选…

Wps中ppt解除密码 | WPS文件加密忘

Wps中ppt解除密码 | WPS文件加密忘

密码,文档,文件加密,忘记密码,密码保护,1.WPS文件加密忘记密码怎么解除被加密的文档需要您先具备解密密码,如密码已遗忘,目前官方没有办法帮助找回(编辑密码/打开密码均不可找回),建议您可尝试更换大小写尝试解锁。如您已找回密码,可参考下方方法…

wps表格中根据名次排列 | wps表格

wps表格中根据名次排列 | wps表格

排序,排列,教程,表格,名次,1.wps表格怎么排名次wps表格排名次,需要用户打开需要排名次的表格,在表格中输入=rank(B2,B2:B5,0),再按键盘上的F4按钮将表格变为绝对引用,最后下拉表格即可排名。具体操作步骤如下。1、打开需要排名的表格。如下图所…

wps更改下拉框的内容 | 给WPS表格

wps更改下拉框的内容 | 给WPS表格

设置,下拉列表,下拉列表框,文件,下拉框,1.怎样给WPS表格文件设置下拉列表框首先,在WPS表格中输入要使用的序列在WPS表格中选中要使用下拉列表的单元格或单元格区域,切换到“数据”选项卡,点击“有效性”按钮。在打开的“数据有”窗口中,切换到…

wps中删除表格水印页 | WPS表格上

wps中删除表格水印页 | WPS表格上

教程,删除,水印,表格,有个,1.WPS表格上有个像水印的第一页 怎么去掉1、首先在打开的WPS表格页面中可以看到,在单元格的下方显示出水印一样的“第一页”字样,该字样为设置了“分页预览”导致的。2、需要取消显示“第一页”需要点击页面上方工…

在wps文字里加工作表 | 在WPS文字

在wps文字里加工作表 | 在WPS文字

文字,边框,教程,表格,里加,1.如何在WPS文字中插入EXCEL表格工具/原料WPS表格(或excel)WPS文字(或word)方法如下:1、首先,打开WPS文字,找到“插入”面板下的“对象”功能,如图所示。2、点击“对象”后,出现如图所示界面。可以选择插入新建对象和已存…

wps锁定页眉页码 | 急

wps锁定页眉页码 | 急

页眉,设置,锁定,显示,教程,1.急这个需求应该没法实现,因为没有这个功能。点窗口左上角蓝色的“WPS文字”按钮,再点“另存为”,然后在弹出窗口的右下角点“加密”,可以设定“打开文字密码”、“修改文字”密码。不过这个密码是针对整个文档的,没…