尤其是會計工作報表
那麼,在excel中該如何快速的把阿拉伯數字轉化為大寫數字呢
以下提供兩種方法快速實現
用公式嵌套實現
IF(TRIM(A2)="","",IF(A2=0,"",IF(A2<0,"負",)&IF(INT(A2),TEXT(INT(ABS(A2)),"[dbnum2]")&"元",)&IF(INT(ABS(A2)*10)-INT(ABS(A2))*10,TEXT(INT(ABS(A2)*10)-INT(ABS(A2))*10,"[dbnum2]")&"角",IF(INT(ABS(A2))=ABS(A2),,IF(ABS(A2)<0.1,,"零")))&IF(ROUND(ABS(A2)*100-INT(ABS(A2)*10)*10,),TEXT(ROUND(ABS(A2)*100-INT(ABS(A2)*10)*10,),"[dbnum2]")&"分","整")))
會計大寫
用vba自定義函數實現
Function Daxie(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]") &"分")
Daxie=IIf(Abs(M)<0.005,"",IIf(M<0,"負" &A &B &C, A & B & C))
End Function
vba函數
怎麼樣,都會了嗎?關注咕吧課堂 關注你自己的生活學好 做好 活好後續更精彩哦 回見!,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!