当前位置:网站首页>Get the first letter of Chinese phonetic alphabet in Excel and capitalize it
Get the first letter of Chinese phonetic alphabet in Excel and capitalize it
2022-06-25 05:31:00 【qq_ forty-one million five hundred and fifty-four thousand six 】
Final effect 
If the cell is entered =getpychar(E2), And drop-down fill , What you get is an uppercase initial
- open 【 development tool 】 menu , Click on the first 【Visual
Basic】, The code window pops up , In the left margin of the window , Click on the right , choice 【 Insert 】->【 modular 】. A white background box appears on the right side of the window . - Copy and paste the following code into the edit box , And save
Function getpychar(char)
tmp = 65536 + Asc(char)
If (tmp >= 45217 And tmp <= 45252) Then
getpychar = "A"
ElseIf (tmp >= 45253 And tmp <= 45760) Then
getpychar = "B"
ElseIf (tmp >= 45761 And tmp <= 46317) Then
getpychar = "C"
ElseIf (tmp >= 46318 And tmp <= 46825) Then
getpychar = "D"
ElseIf (tmp >= 46826 And tmp <= 47009) Then
getpychar = "E"
ElseIf (tmp >= 47010 And tmp <= 47296) Then
getpychar = "F"
ElseIf (tmp >= 47297 And tmp <= 47613) Then
getpychar = "G"
ElseIf (tmp >= 47614 And tmp <= 48118) Then
getpychar = "H"
ElseIf (tmp >= 48119 And tmp <= 49061) Then
getpychar = "J"
ElseIf (tmp >= 49062 And tmp <= 49323) Then
getpychar = "K"
ElseIf (tmp >= 49324 And tmp <= 49895) Then
getpychar = "L"
ElseIf (tmp >= 49896 And tmp <= 50370) Then
getpychar = "M"
ElseIf (tmp >= 50371 And tmp <= 50613) Then
getpychar = "N"
ElseIf (tmp >= 50614 And tmp <= 50621) Then
getpychar = "O"
ElseIf (tmp >= 50622 And tmp <= 50905) Then
getpychar = "P"
ElseIf (tmp >= 50906 And tmp <= 51386) Then
getpychar = "Q"
ElseIf (tmp >= 51387 And tmp <= 51445) Then
getpychar = "R"
ElseIf (tmp >= 51446 And tmp <= 52217) Then
getpychar = "S"
ElseIf (tmp >= 52218 And tmp <= 52697) Then
getpychar = "T"
ElseIf (tmp >= 52698 And tmp <= 52979) Then
getpychar = "W"
ElseIf (tmp >= 52980 And tmp <= 53640) Then
getpychar = "X"
ElseIf (tmp >= 53679 And tmp <= 54480) Then
getpychar = "Y"
ElseIf (tmp >= 54481 And tmp <= 62289) Then
getpychar = "Z"
Else ' If it's not Chinese , Do not deal with
getpychar = char
End If
End Function
' One by one ASC code
Function getpy(str)
For i = 1 To Len(str)
getpy = getpy & getpychar(Mid(str, i, 1))
Next i
End Function
- Click on the menu 【 preservation 】, Pop up a prompt box , spot 【 yes 】, A prompt box pops up again , spot 【 determine 】.
- go back to excel file , Just like other functions , Enter... In the cell = The name of the function ( Cell ) You can enter.
- getpychar The function is to get only the uppercase initials ,getpy To get the full spelling of the capital initial
边栏推荐
- Reading and writing of nodejs excel (.Xlsx) files
- Activereportsjs V3.0 comes on stage
- A review of small sample learning
- Semantic segmentation fcns in the wild: pixel level adaptive and constraint based adaptation
- In depth understanding of line height and vertical align
- Can bus extended frame
- JSON Library Tutorial from scratch (III): parsing strings, learning and sorting notes
- Attack and defense world web baby Web
- Detailed summary of position positioning
- How to install the blue lake plug-in to support Photoshop CC 2017
猜你喜欢

Summary of SQL injection (I)

Essais de pénétration - sujets d'autorisation

Reading and writing of nodejs excel (.Xlsx) files

Dynamic programming example 1 leetcode 322 coin change

hr竟主动给这位测试小姐姐涨工资,她是怎么做到的?

Read the general components of antd source code

Common cluster deployment schemes in redis

Depth of binary tree

TeeChart Pro ActiveX 2022.1

Code learning-cvpr2020 unsupervised domain adaptive semantic segmentation: intra advance
随机推荐
Go implements LRU cache
Use serialize in egg to read and write split tables
SRC platform summary
Code learning-cvpr2020 unsupervised domain adaptive semantic segmentation: intra advance
Dynamic programming example 2 leetcode62 unique paths
PHP calls map API
Bind simulation, key points of interpreting bind handwritten code [details]
TX Text Control 30.0 ActiveX
Monkey test of APP automation
Even if you are not good at anything, you are growing a little bit [to your 2021 summary]
Activereportsjs V3.0 comes on stage
Critical dependency: require function is used in a way in which dependencies
For in JS Of and for in
Keyboard key code value
The construction and usage of wampserver framework
Design of IM login server and message server
3.2.3 use tcpdump to observe TCP header information (supplement common knowledge of TCP protocol)
[pan Wai 1] Huawei computer test
JSON Library Tutorial from scratch (II): parsing digital learning and sorting notes
Personalized Federated Learning with Moreau Envelopes