回覆列表
-
1 # artss3927
-
2 # 發熱的插座
如A列是漢字,從A1開始,則B1中的公式為:=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"})下拉填充
提取首字母嗎?這個自定義函式可以Function PY(ByVal rng As Range) Dim i%, k%, str$ str = Replace(Replace(rng, " ", ""), " ", "") For i = 1 To Len(str) If Mid(str, i, 1) Mid(str, i, 1) k = k + 1 Loop PY = PY & Chr(64 + k) End If NextEnd Function單元格中輸入=py(要提取的單元格地址)就可以,參見附件,注意要啟用宏