資源描述:
《在excel中根據(jù)小寫的金額自動(dòng)生成大寫金額》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、在Excel中根據(jù)小寫的金額自動(dòng)生成大寫金額2008年05月24日星期六10:44在Excel中,我想根據(jù)小寫的金額自動(dòng)生成大寫金額例一:?jiǎn)枺喝绺郊?,我希望根?jù)已有的小寫金額讓Excel自動(dòng)生成規(guī)范的大寫金額。謝謝!附件:例表.人民幣大小寫之間的轉(zhuǎn)換.xls答案一:=IF(ISNUMBER(A3),IF(INT(A3),TEXT(INT(A3),"[dbnum2]")&"元",)&IF(INT(A3*10)-INT(A3)*10,TEXT(INT(A3*10)-INT(A3)*10,"[dbnum2]")&"角",IF(INT
2、(A3)=A3,,IF(A3<0.1,,"零")))&IF(ROUND((A3)*100-INT(A3*10)*10,),TEXT(ROUND(A3*100-INT(A3*10)*10,),"[dbnum2]")&"分","整"),"")附件:例表.人民幣大小寫之間的轉(zhuǎn)換2.xls答案二:給你一個(gè),放在工具里:Functionconvert_digital_chinese(ByValMyinput)DimTemp,TempA,MyinputA,MyinputB,MyinputCDimPlaceAsStringDimJAsInteg
3、erPlace="分角元拾佰仟萬(wàn)拾佰仟億拾佰仟萬(wàn)"shuzi1="壹貳叁肆伍陸柒捌玖"shuzi2="整零元零零零萬(wàn)零零零億零零零萬(wàn)"qianzhui=""IfMyinput<0Thenqianzhui="負(fù)"Myinput=Int(Abs(Myinput)*100+0.5)IfMyinput>999999999999999#Thenmychange="數(shù)字太大了吧???"ExitFunctionEndIfIfMyinput=0Thenmychange="零元零分"ExitFunctionEndIfMyinputA=Trim(St
4、r(Myinput))shuzilong=Len(MyinputA)ForJ=1ToshuzilongMyinputB=Mid(MyinputA,J,1)&MyinputBNextForJ=1ToshuzilongTemp=Val(Mid(MyinputB,J,1))IfTemp=0ThenMyinputC=Mid(shuzi2,J,1)&MyinputCElseMyinputC=Mid(shuzi1,Temp,1)&Mid(Place,J,1)&MyinputCEndIfNextshuzilong=Len(MyinputC)Fo
5、rJ=1Toshuzilong-1IfMid(MyinputC,J,1)="零"ThenSelectCaseMid(MyinputC,J+1,1)Case"零","元","萬(wàn)","億","整":MyinputC=Left(MyinputC,J-1)&Mid(MyinputC,J+1,30)J=J-1EndSelectEndIfNextshuzilong=Len(MyinputC)ForJ=1Toshuzilong-1IfMid(MyinputC,J,1)="億"AndMid(MyinputC,J+1,1)="萬(wàn)"ThenMyinp
6、utC=Left(MyinputC,J)&Mid(MyinputC,J+2,30)ExitForEndIfNextmychange=qianzhui&Trim(MyinputC)EndFunction來(lái)源:http://iask.sina.com.cn/b/7702446.html?from=related例二:如何設(shè)公式將¥654654.36自動(dòng)生成"人民幣陸拾伍萬(wàn)肆仟陸佰伍拾肆元叁角陸分"答案一:=TEXT(INT(A1),"[DBNum2]")&"元"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEX
7、T(RIGHT(TEXT(A1,"0.00"),2),"[DBNum2]0角0分"),"零角零分","整"),"零分",""),"零角","零")答案二:="人民幣"&TEXT(INT(A1),"[DBNum2]")&"元"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(RIGHT(TEXT(A1,"0.00"),2),"[DBNum2]0角0分"),"零角零分","整"),"零分","整"),"零角","零")1、樓主需要在前面加上人民幣2、如果沒有分的話,角后面應(yīng)該也加個(gè)“整”字這個(gè)我用過(guò)試了,不
8、錯(cuò),好用,呵呵來(lái)源:http://www.excelpx.com/dispbbs.asp?BoardID=38&ID=38088三、復(fù)制下列公式,然后“選擇性粘貼”(以“文本”方式)到除“A1”單元格外的任意一個(gè)單元格中,比如“B1”單元格,然后在