excel 數(shù)字小寫(xiě)轉(zhuǎn)大寫(xiě)公式應(yīng)該怎么做
對(duì)于excel數(shù)據(jù)處理,我們經(jīng)常會(huì)用到大小寫(xiě)的轉(zhuǎn)化。所以需要利用Excel中的轉(zhuǎn)化公式,下面是學(xué)習(xí)啦小編整理的excel 數(shù)字小寫(xiě)轉(zhuǎn)大寫(xiě)公式的教程,以供大家閱讀。
excel 數(shù)字小寫(xiě)轉(zhuǎn)大寫(xiě)公式的教程1
通過(guò)函數(shù)嵌套實(shí)現(xiàn)
數(shù)字轉(zhuǎn)人民幣大寫(xiě)形式的公式是:
=IF(B1<0,"金額為負(fù)無(wú)效",
(IF(OR(B1=0,B1=""),"(人民幣)零元",
IF(B1<1,"(人民幣)",
TEXT(INT(B1),"[dbnum2](人民幣)G/通用格式")&"元"))))&
IF(
(INT(B1*10)-INT(B1)*10)=0,
IF(INT(B1*100)-INT(B1*10)*10=0,"","零"),
(TEXT(INT(B1*10)-INT(B1)*10,"[dbnum2]")&"角"))
&IF(
(INT(B1*100)-INT(B1*10)*10)=0,
"整",
TEXT((INT(B1*100)-INT(B1*10)*10),"[dbnum2]")&"分")
數(shù)字轉(zhuǎn)人民幣大寫(xiě)形式的公式是:
="大寫(xiě)金額:"&IF(TRIM(B1)="","",IF(B1=0,"","人民幣"&IF(B1<0,"負(fù)",)&IF(INT(B1),TEXT(INT(ABS(B1)),"[dbnum2]")&"元",)&IF(INT(ABS(B1)*10)-INT(ABS(B1))*10,TEXT(INT(ABS(B1)*10)-INT(ABS(B1))*10,"[dbnum2]")&"角",IF(INT(ABS(B1))=ABS(B1),,IF(ABS(B1)<0.1,,"零")))&IF(ROUND(ABS(B1)*100-INT(ABS(B1)*10)*10,),TEXT(ROUND(ABS(B1)*100-INT(ABS(B1)*10)*10,),"[dbnum2]")&"分","整")))
怎樣在EXCEL中數(shù)字轉(zhuǎn)人民幣大寫(xiě)
excel 數(shù)字小寫(xiě)轉(zhuǎn)大寫(xiě)公式的教程2
通過(guò)宏VBA自定義函數(shù)實(shí)現(xiàn)第一步:按下ALT+F11組合鍵,或者是單擊工具——宏——Visual Basic編輯器,進(jìn)入Visual Basic編程環(huán)境,單擊“插入” 菜單——模塊,復(fù)制下面代碼,保存,退出關(guān)閉。Function N2RMB(M)
y = Int(Round(100 * Abs(M)) / 100)
j = Round(100 * Abs(M) + 0.00001) - y * 100
f = (j / 10 - Int(j / 10)) * 10
A = IIf(y < 1, "", Application.Text(y, "[DBNum2]") & "元")
b = IIf(j > 9.5, Application.Text(Int(j / 10), "[DBNum2]") & "角", IIf(y < 1, "", IIf(f > 1, "零", "")))
c = IIf(f < 1, "整", Application.Text(Round(f, 0), "[DBNum2]") & "分")
N2RMB = IIf(Abs(M) < 0.005, "", IIf(M < 0, "負(fù)" & A & b & c, A & b & c))
End Function
第二步:返回excel操作界面,在B1單元格輸入:= N2RMB (A1),就可以將A1單元格的數(shù)字轉(zhuǎn)為人民幣大寫(xiě),然后向下復(fù)制公式即可將全部的數(shù)字轉(zhuǎn)為人民幣大寫(xiě)。