WPS表格三秒钟获取字词对应的第一个字母

【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"})

WPS表格三秒钟获取字词对应的第一个字母