资源描述:
《姓名字母缩写提取法》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、姓名字母缩写提取法一、姓名字母提取方法:=LOOKUP(CODE(A1),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"})&IF(LEN(A1)>1,LOOKUP(CODE
2、(MID(A1,2,1)),45217+{-45185,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"}),"")&IF(LEN(A1)>2,LOOKUP(CODE(MID(A1,3
3、,1)),45217+{-45185,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"}),"")&IF(LEN(A1)>3,LOOKUP(CODE(MID(A1,4,1)),4521
4、7+{-45185,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"}),"")二、语句字母提取方法:(自定义函数:工具-宏-VB编辑器-插入模块)Functionhztopy(hzp
5、yAsString)AsStringDimhzstringAsString,pystringAsStringDimhzpysumAsInteger,hziAsInteger,hzpyhexAsIntegerhzstring=Trim(hzpy)hzpysum=Len(Trim(hzstring))pystring=""Forhzi=1Tohzpysumhzpyhex="&H"+Hex(Asc(Mid(hzstring,hzi,1)))SelectCasehzpyhexCase&HB0A1To&HB0C4:pystring=pystring+
6、"A"Case&HB0C5To&HB2C0:pystring=pystring+"B"Case&HB2C1To&HB4ED:pystring=pystring+"C"Case&HB4EETo&HB6E9:pystring=pystring+"D"Case&HB6EATo&HB7A1:pystring=pystring+"E"Case&HB7A2To&HB8C0:pystring=pystring+"F"Case&HB8C1To&HB9FD:pystring=pystring+"G"Case&HB9FETo&HBBF6:pystring=py
7、string+"H"Case&HBBF7To&HBFA5:pystring=pystring+"J"Case&HBFA6To&HC0AB:pystring=pystring+"K"Case&HC0ACTo&HC2E7:pystring=pystring+"L"Case&HC2E8To&HC4C2:pystring=pystring+"M"Case&HC4C3To&HC5B5:pystring=pystring+"N"Case&HC5B6To&HC5BD:pystring=pystring+"O"Case&HC5BETo&HC6D9:pyst
8、ring=pystring+"P"Case&HC6DATo&HC8BA:pystring=pystring+"Q"Case&HC8BBTo&HC8F5:pystring=pyst