瀏覽量:9次
方法一:Function 大寫金額(N)'數(shù)字轉(zhuǎn)為大寫金額,僅一個參數(shù)。Application.Volatile大寫金額 = Replace(Application.Text(Round(N + 0.00000001, 2), "[DBnum2]"), ".", "元")大寫金額 = IIf(Left(Right(大寫金額, 3), 1) = "元", Left(大寫金額, Len(大寫金額) - 1) & "角" & Right(大寫金額, 1) & "分", IIf(Left(Right(大寫金額, 2), 1) = "元", 大寫金額 & "角整", IIf(大寫金額 = "零", "", 大寫金額 & "元整")))大寫金額 = Replace(Replace(Replace(Replace(大寫金額, "零元零角", ""), "零元", ""), "零角", "零"), "-", "負(fù)")End Function
將上面的自定義函數(shù)作為加載宏加載到你的EXCEL程序中,再插入函數(shù)“大寫金額(N)”即可方法二:B1輸入=IF(ROUND(A1,2)<0,"無效數(shù)值",IF(ROUND(A1,2)=0,"零",IF(ROUND(A1,2)<1,"",TEXT(INT(ROUND(A1,2)),"[dbnum2]")&"元")&IF(INT(ROUND(A1,2)*10)-INT(ROUND(A1,2))*10=0,IF(INT(ROUND(A1,2))*(INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10)=0,"","零"),TEXT(INT(ROUND(A1,2)*10)-INT(ROUND(A1,2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10)=0,"整",TEXT((INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10),"[dbnum2]")&"分")))
[聲明]本網(wǎng)轉(zhuǎn)載網(wǎng)絡(luò)媒體稿件是為了傳播更多的信息,此類稿件不代表本網(wǎng)觀點,本網(wǎng)不承擔(dān)此類稿件侵權(quán)行為的連帶責(zé)任。故此,如果您發(fā)現(xiàn)本網(wǎng)站的內(nèi)容侵犯了您的版權(quán),請您的相關(guān)內(nèi)容發(fā)至此郵箱【779898168@qq.com】,我們在確認(rèn)后,會立即刪除,保證您的版權(quán)。
官網(wǎng)優(yōu)化
整站優(yōu)化
渠道代理
400-655-5776