国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
Excel自動(dòng)轉(zhuǎn)換數(shù)字大小寫(xiě)
2009-09-14 18:05
Excel自動(dòng)轉(zhuǎn)換數(shù)字大小寫(xiě)具體的操作步驟如下:
1. 啟動(dòng)excel。按“alt+f11”快捷鍵打開(kāi)“visual basic編輯器”。
2. 在“visual basic編輯器”中,單擊“插入”菜單欄中的“模塊”命令,插入一個(gè)模塊。雙擊左側(cè)“工程”窗口中的“模塊1”選項(xiàng),在窗口右邊展開(kāi)“模塊1(代碼)”編輯窗口,然后輸入如下代碼:
function dx(q)
dim cur as long,yuan as long
dim jiao as integer,fen as integer
dim cnyuan as string, cnjiao as string, cnfen as string
if q = "" then
dx = 0
exit function
end if
cur = round(q * 100)
yuan = int(cur / 100)
jiao = int(cur / 10) - yuan * 10
fen = cur - yuan * 100 - jiao * 10
cnyuan = application.worksheetfunction.text(yuan, "[dbnum2]")
cnjiao = application.worksheetfunction.text(jiao, "[dbnum2]")
cnfen = application.worksheetfunction.text(fen, "[dbnum2]")
dx = cnyuan & "元" &"整"
d1 = cnyuan & "元"
if fen <> 0 and jiao <> 0 then
dx = d1 & cnjiao & "角"& cnfen & "分"
if yuan = 0 then
dx = cnjiao & "角" &cnfen & "分"
end if
end if
if fen = 0 and jiao <> 0 then
dx = d1 & cnjiao & "角"& "整"
if yuan = 0 then
dx = cnjiao & "角" &"整"
end if
end if
if fen <> 0 and jiao = 0 then
dx = d1 & cnjiao & cnfen & "分"
if yuan = 0 then
dx = cnfen & "分"
end if
end if
end function
輸 入完成后,關(guān)閉“visual basic編輯器”返回工作表?,F(xiàn)在,我們可測(cè)試一下這個(gè)函數(shù)。首先,在a1單元格中輸入一個(gè)小寫(xiě)數(shù)字的金額,例如123456.78,然后,在a2單元 格中輸入公式:=dx(a1),確認(rèn)后即可將a1所表示的小寫(xiě)數(shù)字金額轉(zhuǎn)換為大寫(xiě)的數(shù)字金額,并在a2單元格中顯示出來(lái)。怎么樣,方便吧?
關(guān)于EXCEL小數(shù)位四舍五入的問(wèn)題
將單元格格式設(shè)置為數(shù)字,保留一位小數(shù)就自動(dòng)四舍五入到角了。但我在這里要提醒你的是,像工資單一類的表格,最好到 工具/選項(xiàng)/重新計(jì)算中,選中“以顯示精度為準(zhǔn)”,不然的話匯總出來(lái)有可能產(chǎn)生最后一位數(shù)有誤差的現(xiàn)象。
注意:使用時(shí),EXCEL會(huì)出現(xiàn)“啟用宏”?點(diǎn)擊確定。還有請(qǐng)將安全級(jí)別設(shè)置為“中”,就可以了。
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
EXCEL的金額大小寫(xiě)轉(zhuǎn)換方法存在問(wèn)題
EXCEL金額轉(zhuǎn)大寫(xiě)公式與自定義函數(shù)
Word2007能否實(shí)現(xiàn)有沒(méi)有將數(shù)字轉(zhuǎn)換為大寫(xiě)金額的功能
C#的一些關(guān)鍵字的總結(jié)
C# 參考之轉(zhuǎn)換關(guān)鍵字:operator、explicit與implicit
構(gòu)造函數(shù)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服