How to convert numbers into Chinese currency in capitals
Publish: 2021-04-17 21:50:44
1. Right click "user defined cell format" = =, special = =, Chinese capitalization
if you are not satisfied, try this:
= numberstring (1234567890,1)
parameter 1 can be modified, 123456.. is a hypothetical number, which can be changed to cell name
if not, try this:
= subordinate (text (fixed (A1)), & quote[& gt; 0][dbnum2];[& lt; 0] negative [dbnum2]& quot;)& TEXT(RIGHT(FIXED(A1),2)," Yuan [dbnum2] 0 Jiao 0 fen& quot;& IF(ABS(A1)> 1%," Yuan integer & quot;,)& quot; Zero angle;, IF(ABS(A1)< 1,," Zero & quot;)& quot; Zero & quot& quot; Integer (& quot;)
where A1 is the cell of hypothetical data.
if you are not satisfied, try this:
= numberstring (1234567890,1)
parameter 1 can be modified, 123456.. is a hypothetical number, which can be changed to cell name
if not, try this:
= subordinate (text (fixed (A1)), & quote[& gt; 0][dbnum2];[& lt; 0] negative [dbnum2]& quot;)& TEXT(RIGHT(FIXED(A1),2)," Yuan [dbnum2] 0 Jiao 0 fen& quot;& IF(ABS(A1)> 1%," Yuan integer & quot;,)& quot; Zero angle;, IF(ABS(A1)< 1,," Zero & quot;)& quot; Zero & quot& quot; Integer (& quot;)
where A1 is the cell of hypothetical data.
2. =TEXT(RMB(A1), "[] g& quot;& TEXT(INT(ABS(A1)+0.5%), "[ dbnum2]G/36890;-29992;-26684;-24335;-20803;&& quot;& SUBSTITUTE(SUBSTITUTE(TEXT(RIGHT(RMB(A1),2),"[ dbnum2]035282;020998;; .25972;quot;," quot; (38646;)35282", IF(A1^2< 1," 38646,"] quot; .38646;. quot; 25972;quot;]
3. This is easier! Suppose it's 23.68 yuan, select this cell - right click - set cell format - Special - Chinese capital number (on the right)
4. 1. Baosteel Special enamel plate is the most important material of enamel liner. The quality of steel plate must be selected according to the requirements of forming (deformation, welding, etc.), enameling process and enamel procts. The expansion coefficient of enamel is 32 × 10-7
the carbon content of the selected plate is ≤ 0.08%. The yield limit and strength limit of the steel are increased, but the elongation is decreased when the steel contains appropriate amount of manganese. Therefore, the higher the manganese content, the greater the deformation force required
for carbon steel, silicon and manganese are the resies of deoxidizer ring smelting. In general, silicon content & lt; 0.37% of the steel plate can be used for deep drawing, but beyond this value, even the steel with low carbon content will become hard and brittle, which is not suitable for deep drawing and affects the sealing performance. The existence of sulfide will affect the microstructure of steel plate to a great extent, promote the generation of stripe structure, and rece the plasticity and toughness of finished steel, that is, rece the drawing performance of finished steel, and bubbles and pores will appear in the porcelain layer. Phosphorus dissolved in ferrite can significantly rece the plasticity of finished steel, but improve its strength and hardness; 0.06% Titanium added to steel is very beneficial to enamel. Because it can combine with various components in enamel and increase the density, Baosteel Special enamel plate BTC 330r is the most ideal base material for enamel liner
2. The water tank is just a popular hemispherical pressure head
the pressure tank head is made of 2mm thick special enamel steel plate. The hemispherical shape of the maximum limit should be achieved in the design, so that the bearing capacity and fatigue resistance can reach the best. To ensure the minimum deformation of enamel water tank after long-term use, so as to extend the service life of enamel water tank. When the pressure is 1.5 times of the rated pressure, the times of pressure can reach 300000
3. Structural characteristics of the tank
the tank adopts double flange structure, which solves the hidden trouble of pool coating quality caused by the failure to grind the welded joint before pool coating; The butt welding method of head and barrel body can avoid bubble ring pool coating by conventional lap welding method; The special water tank fixed belt can solve the hidden trouble of enamel liner damage caused by long time suspension of water tank; The special enamel electric heating can solve the problems of low heating efficiency, waste of resources and hidden danger of safety after the common electric heating is attached with scale; The bending welding method of the medium water nozzle solves the problem of poor medium flow in the past right angle welding.
the carbon content of the selected plate is ≤ 0.08%. The yield limit and strength limit of the steel are increased, but the elongation is decreased when the steel contains appropriate amount of manganese. Therefore, the higher the manganese content, the greater the deformation force required
for carbon steel, silicon and manganese are the resies of deoxidizer ring smelting. In general, silicon content & lt; 0.37% of the steel plate can be used for deep drawing, but beyond this value, even the steel with low carbon content will become hard and brittle, which is not suitable for deep drawing and affects the sealing performance. The existence of sulfide will affect the microstructure of steel plate to a great extent, promote the generation of stripe structure, and rece the plasticity and toughness of finished steel, that is, rece the drawing performance of finished steel, and bubbles and pores will appear in the porcelain layer. Phosphorus dissolved in ferrite can significantly rece the plasticity of finished steel, but improve its strength and hardness; 0.06% Titanium added to steel is very beneficial to enamel. Because it can combine with various components in enamel and increase the density, Baosteel Special enamel plate BTC 330r is the most ideal base material for enamel liner
2. The water tank is just a popular hemispherical pressure head
the pressure tank head is made of 2mm thick special enamel steel plate. The hemispherical shape of the maximum limit should be achieved in the design, so that the bearing capacity and fatigue resistance can reach the best. To ensure the minimum deformation of enamel water tank after long-term use, so as to extend the service life of enamel water tank. When the pressure is 1.5 times of the rated pressure, the times of pressure can reach 300000
3. Structural characteristics of the tank
the tank adopts double flange structure, which solves the hidden trouble of pool coating quality caused by the failure to grind the welded joint before pool coating; The butt welding method of head and barrel body can avoid bubble ring pool coating by conventional lap welding method; The special water tank fixed belt can solve the hidden trouble of enamel liner damage caused by long time suspension of water tank; The special enamel electric heating can solve the problems of low heating efficiency, waste of resources and hidden danger of safety after the common electric heating is attached with scale; The bending welding method of the medium water nozzle solves the problem of poor medium flow in the past right angle welding.
5. Select the area, click Format - cell - number - special in the menu bar, and change it to Chinese capital number.
6. =TEXT(A1*100," RMB one hundred thousand yuan and Jiao Fen [dbnum2] & quot;)
7. IF(A2< 0," "" quot; quot; TEXT(TRUNC(ABS(ROUND(A2,2),"[ DBNum2]"& quot; " IF(ISERR(FIND("& quot; ROUND(A2,2),"& quot; TEXT(RIGHT(TRUNC(ROUND(A2,2)*10),"[ DBNum2]")& IF(ISERR(FIND) 0" TEXT(A2," 0.00"),& quot; "" quot; quot; IF(LEFT(RIGHT(ROUND(A2,2),3)="& quot; TEXT(RIGHT(ROUND(A2,2),"[ DBNum2]"& quot; "" quot; ") A236135;"24065;" 26684s;
8. Chinese can be converted to uppercase by custom data format. If you need a full amount, you can refer to the following:
= subscribe (text (truncate (fixed (A1)), & quot[& gt; 0][dbnum2];[& lt; 0] negative [dbnum2]& quot;)& TEXT(RIGHT(FIXED(A1),2)," Yuan [dbnum2] 0 Jiao 0 fen& quot;& IF(ABS(A1)> 1%," Yuan integer & quot;,)& quot; Zero angle;, IF(ABS(A1)< 1,," Zero & quot;)& quot; Zero & quot& quot; Integer (& quot;)
= subscribe (text (truncate (fixed (A1)), & quot[& gt; 0][dbnum2];[& lt; 0] negative [dbnum2]& quot;)& TEXT(RIGHT(FIXED(A1),2)," Yuan [dbnum2] 0 Jiao 0 fen& quot;& IF(ABS(A1)> 1%," Yuan integer & quot;,)& quot; Zero angle;, IF(ABS(A1)< 1,," Zero & quot;)& quot; Zero & quot& quot; Integer (& quot;)
9. 用numberstring函数
如:将a2单元格的531转换成大写,则公式
=numberstring(a2,2):此时得出:伍佰叁拾壹
=numberstring(a2,1):此时得出:五百三十一
=numberstring(a2,3):此时得出:五三一
如要将数字读出:则用此公式
=if(iserror(find(".",a2)),numberstring(int(a2),2)&"元整",if(iserror(numberstring(mid(a2,find(".",a2)+2,1),2)),numberstring(int(a2),2)&"元"&numberstring(mid(a2,find(".",a2)+1,1),2)&"角整",numberstring(int(a2),2)&"元"&numberstring(mid(a2,find(".",a2)+1,1),2)&"角"&numberstring(mid(a2,find(".",a2)+2,1),2)&"分"))
如:将a2单元格的531转换成大写,则公式
=numberstring(a2,2):此时得出:伍佰叁拾壹
=numberstring(a2,1):此时得出:五百三十一
=numberstring(a2,3):此时得出:五三一
如要将数字读出:则用此公式
=if(iserror(find(".",a2)),numberstring(int(a2),2)&"元整",if(iserror(numberstring(mid(a2,find(".",a2)+2,1),2)),numberstring(int(a2),2)&"元"&numberstring(mid(a2,find(".",a2)+1,1),2)&"角整",numberstring(int(a2),2)&"元"&numberstring(mid(a2,find(".",a2)+1,1),2)&"角"&numberstring(mid(a2,find(".",a2)+2,1),2)&"分"))
10. 用VBA自定义一个大写金额转换的函数,在公式中输入此函数名就可以了
具体方法:按 Alt+F11 ,在VBA编辑器菜单中点 插入→模块,将下面的函数复制到插入的模块当中,
'===================================================================
Function CChinese(StrEng As String) As String
'将阿拉伯数字转成中文字的程式例如:1560890 转成 "壹佰伍拾陆万零捌佰玖拾"
'程式限制为不可输入超过16个数字
If Not IsNumeric(StrEng) Or StrEng Like "*.*" Or StrEng Like "*-*" Then
If Trim(StrEng) <> "" Then MsgBox "无效的数字"
CChinese = "": Exit Function
End If
Dim intLen As Integer, intCounter As Integer
Dim strCh As String, strTempCh As String
Dim strSeqCh1 As String, strSeqCh2 As String
Dim strEng2Ch As String
strEng2Ch = "零壹贰叁肆伍陆柒捌玖"
strSeqCh1 = " 拾佰仟 拾佰仟 拾佰仟 拾佰仟"
strSeqCh2 = " 万亿兆"
StrEng = CStr(CDec(StrEng))
intLen = Len(StrEng)
For intCounter = 1 To intLen
strTempCh = Mid(strEng2Ch, Val(Mid(StrEng, intCounter, 1)) + 1, 1)
If strTempCh = "零" And intLen <> 1 Then
If Mid(StrEng, intCounter + 1, 1) = "0" Or (intLen - intCounter + 1) Mod 4 = 1 Then
strTempCh = ""
End If
Else
strTempCh = strTempCh & Trim(Mid(strSeqCh1, intLen - intCounter + 1, 1))
End If
If (intLen - intCounter + 1) Mod 4 = 1 Then
strTempCh = strTempCh & Mid(strSeqCh2, (intLen - intCounter + 1) \ 4 + 1, 1)
If intCounter > 3 Then
If Mid(StrEng, intCounter - 3, 4) = "0000" Then strTempCh = Left(strTempCh, Len(strTempCh) - 1)
End If
End If
strCh = strCh & Trim(strTempCh)
Next
CChinese = strCh
End Function
'===================================================================
'===================================================================
Function daxie(money As String) As String
'实现货币金额中文大写转换的程序
'程式限制为不可输入超过16个数字
Dim x As String, y As String
Const zimu = ".sbqwsbqysbqwsbq" '定义位置代码
Const letter = "0123456789sbqwy.zjf" '定义汉字缩写
Const upcase = "零壹贰叁肆伍陆柒捌玖拾佰仟万亿圆整角分" '定义大写汉字
If CDbl(money) >= 1E+16 Then daxie = "#VALUE!": Exit Function '只能转换一亿亿元以下数目的货币
x = Format(money, "0.00") '格式化货币
y = ""
For i = 1 To Len(x) - 3
y = y & Mid(x, i, 1) & Mid(zimu, Len(x) - 2 - i, 1)
Next
If Right(x, 3) = ".00" Then
y = y & "z" '***元整
Else
y = y & Left(Right(x, 2), 1) & "j" & Right(x, 1) & "f" '*元*角*分
End If
y = Replace(y, "0q", "0") '避免零千(如:40200肆万零千零贰佰)
y = Replace(y, "0b", "0") '避免零百(如:41000肆万壹千零佰)
y = Replace(y, "0s", "0") '避免零十(如:204贰佰零拾零肆)
y = Replace(y, "0j", "0") '避免零角
y = Replace(y, "0f", "") '避免零分
Do While y <> Replace(y, "00", "0")
y = Replace(y, "00", "0") '避免双零(如:1004壹仟零零肆)
Loop
y = Replace(y, "0y", "y") '避免零亿(如:210亿 贰佰壹十零亿)
y = Replace(y, "0w", "w") '避免零万(如:210万 贰佰壹十零万)
y = IIf(x < 0.1, Right(y, Len(y) - 3), y) '避免零几分(如:0.01零壹分0.04零肆分)
y = IIf(Len(x) = 5 And Left(y, 1) = "1", Right(y, Len(y) - 1), y) '避免壹十(如:14壹拾肆10壹拾)
y = IIf(Len(x) = 4, Replace(y, "0.", ""), Replace(y, "0.", ".")) '避免零元(如:20.00贰拾零圆0.12零圆壹角贰分)
For i = 1 To 19
y = Replace(y, Mid(letter, i, 1), Mid(upcase, i, 1)) '大写汉字
Next
daxie = y
End Function
'===================================================================
回到Excel工作表中,若要转化A1单元格的数字,则可在其他任意单元格中输入公式 =CChinese(A1)要转换成大写金额,则可在其他任意单元格中输入公式 =daxie(A1)
具体方法:按 Alt+F11 ,在VBA编辑器菜单中点 插入→模块,将下面的函数复制到插入的模块当中,
'===================================================================
Function CChinese(StrEng As String) As String
'将阿拉伯数字转成中文字的程式例如:1560890 转成 "壹佰伍拾陆万零捌佰玖拾"
'程式限制为不可输入超过16个数字
If Not IsNumeric(StrEng) Or StrEng Like "*.*" Or StrEng Like "*-*" Then
If Trim(StrEng) <> "" Then MsgBox "无效的数字"
CChinese = "": Exit Function
End If
Dim intLen As Integer, intCounter As Integer
Dim strCh As String, strTempCh As String
Dim strSeqCh1 As String, strSeqCh2 As String
Dim strEng2Ch As String
strEng2Ch = "零壹贰叁肆伍陆柒捌玖"
strSeqCh1 = " 拾佰仟 拾佰仟 拾佰仟 拾佰仟"
strSeqCh2 = " 万亿兆"
StrEng = CStr(CDec(StrEng))
intLen = Len(StrEng)
For intCounter = 1 To intLen
strTempCh = Mid(strEng2Ch, Val(Mid(StrEng, intCounter, 1)) + 1, 1)
If strTempCh = "零" And intLen <> 1 Then
If Mid(StrEng, intCounter + 1, 1) = "0" Or (intLen - intCounter + 1) Mod 4 = 1 Then
strTempCh = ""
End If
Else
strTempCh = strTempCh & Trim(Mid(strSeqCh1, intLen - intCounter + 1, 1))
End If
If (intLen - intCounter + 1) Mod 4 = 1 Then
strTempCh = strTempCh & Mid(strSeqCh2, (intLen - intCounter + 1) \ 4 + 1, 1)
If intCounter > 3 Then
If Mid(StrEng, intCounter - 3, 4) = "0000" Then strTempCh = Left(strTempCh, Len(strTempCh) - 1)
End If
End If
strCh = strCh & Trim(strTempCh)
Next
CChinese = strCh
End Function
'===================================================================
'===================================================================
Function daxie(money As String) As String
'实现货币金额中文大写转换的程序
'程式限制为不可输入超过16个数字
Dim x As String, y As String
Const zimu = ".sbqwsbqysbqwsbq" '定义位置代码
Const letter = "0123456789sbqwy.zjf" '定义汉字缩写
Const upcase = "零壹贰叁肆伍陆柒捌玖拾佰仟万亿圆整角分" '定义大写汉字
If CDbl(money) >= 1E+16 Then daxie = "#VALUE!": Exit Function '只能转换一亿亿元以下数目的货币
x = Format(money, "0.00") '格式化货币
y = ""
For i = 1 To Len(x) - 3
y = y & Mid(x, i, 1) & Mid(zimu, Len(x) - 2 - i, 1)
Next
If Right(x, 3) = ".00" Then
y = y & "z" '***元整
Else
y = y & Left(Right(x, 2), 1) & "j" & Right(x, 1) & "f" '*元*角*分
End If
y = Replace(y, "0q", "0") '避免零千(如:40200肆万零千零贰佰)
y = Replace(y, "0b", "0") '避免零百(如:41000肆万壹千零佰)
y = Replace(y, "0s", "0") '避免零十(如:204贰佰零拾零肆)
y = Replace(y, "0j", "0") '避免零角
y = Replace(y, "0f", "") '避免零分
Do While y <> Replace(y, "00", "0")
y = Replace(y, "00", "0") '避免双零(如:1004壹仟零零肆)
Loop
y = Replace(y, "0y", "y") '避免零亿(如:210亿 贰佰壹十零亿)
y = Replace(y, "0w", "w") '避免零万(如:210万 贰佰壹十零万)
y = IIf(x < 0.1, Right(y, Len(y) - 3), y) '避免零几分(如:0.01零壹分0.04零肆分)
y = IIf(Len(x) = 5 And Left(y, 1) = "1", Right(y, Len(y) - 1), y) '避免壹十(如:14壹拾肆10壹拾)
y = IIf(Len(x) = 4, Replace(y, "0.", ""), Replace(y, "0.", ".")) '避免零元(如:20.00贰拾零圆0.12零圆壹角贰分)
For i = 1 To 19
y = Replace(y, Mid(letter, i, 1), Mid(upcase, i, 1)) '大写汉字
Next
daxie = y
End Function
'===================================================================
回到Excel工作表中,若要转化A1单元格的数字,则可在其他任意单元格中输入公式 =CChinese(A1)要转换成大写金额,则可在其他任意单元格中输入公式 =daxie(A1)
Hot content