|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 lunkuo 于 2011-8-20 09:49 编辑
人民币大写转换,102000.00,一般中文写法为“壹拾万贰仟元整”,而有人喜欢写成“壹拾万零贰仟元整”,同样,20.34,一般写为“贰拾元叁角肆分”,也有人习惯写成“贰拾元零叁角肆分”。下面这条公式可满足“零”的这种特殊需要
=IF(ROUND(B3,2),TEXT(B3,";负")&SUBSTITUTE(SUBSTITUTE(TEXT(INT(ABS(B3)+0.5%),"[dbnum2]G/通用格式元;;"),"亿",TEXT(LEFT(RIGHT(FIXED(B3,2,1),12),2),"[>9]亿;[=]亿;亿零")),"万",TEXT(LEFT(RIGHT(FIXED(B3,2,1),8),2),"[>9]万;[=]万;万零"))&IF(B3^2<1,,TEXT(LEFT(RIGHT(RMB(B3),4),3),"[>=1]g;[=]g;零"))&TEXT(LEFT(RIGHT(RMB(B3),2)),"[dbnum2]0角;;"&IF((ROUND(B3,0)=ROUND(B3,2))+(B3^2<1),,"零"))&TEXT(RIGHT(RMB(B3)),"[dbnum2]0分;;整"),"")
这条公式考虑“亿零”“万零”“元零”的情况,追求实用。
人民币零写法
而下面是常规的人民币大写转换公式
=IF(ROUND(B3,2),TEXT(B3,";负")&TEXT(INT(ABS(B3)+0.5%),"[dbnum2]G/通用格式元;;")&IF((ROUND(B3,0)=ROUND(B3,2))+(ABS(B3)<9.5%),,TEXT(LEFT(RIGHT(RMB(B3),2)),"[dbnum2]0角;;零"))&TEXT(RIGHT(RMB(B3)),"[dbnum2]0分;;整"),"")
如需要更多的转换公式,可参考另外一个帖子http://club.excelhome.net/thread-752150-1-1.html
|
评分
-
1
查看全部评分
-
|