cnblogs/dcrenl/excel 数字转中文大写金额.md
2024-09-24 12:43:01 +08:00

292 B
Raw Permalink Blame History

1、在单元格中输入公式 =SUBSTITUTE(SUBSTITUTE(IF(-RMB(A1,2),TEXT(A1,";负")&TEXT(INT(ABS(A1)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHT(RMB(A1,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A1^2<1,,"零")),"零分","整")

2、替换公式中的A1为需要转换的单元格