Excel实现发票小写金额填充
我输入123456.52它自动给拆成¥1 2 3 4 5 6 5 2 的形式并且随我输入的长度改变而改变?
解答:我所知函数不多,我是这样做的,如有更方便的方法,请指点
例如:
在A1输入小写金额,则:
千万:B1=IF(A1>=10000000,MID(RIGHTB(A1*100,10),1,1),IF(A1>=1000000,"¥",0))
百万:C1=IF(A1>=1000000,MID(RIGHTB(A1*100,9),1,1),IF(A1>=100000,"¥",0))
十万:D1=IF(A1>=100000,MID(RIGHTB(A1*100,8),1,1),IF(A1>=10000,"¥",0))
万:E1=IF(A1>=10000,MID(RIGHTB(A1*100,7),1,1),IF(A1>=1000,"¥",0))
千:F1=IF(A1>=1000,MID(RIGHTB(A1*100,6),1,1),IF(A1>=100,"¥",0))
百:G1=IF(A1>=100,MID(RIGHTB(A1*100,5),1,1),IF(A1>=10,"¥",0))
十:H1=IF(A1>=10,MID(RIGHTB(A1*100,4),1,1),IF(A1>=1,"¥",0))
元:I1=IF(A1>=1,MID(RIGHTB(A1*100,3),1,1),IF(A1>=0.1,"¥",0))
角:J1=IF(A1>=0.1,MID(RIGHTB(A1*100,2),1,1),IF(A1>=0.01,"¥",0))
分:K1=IF(A1>=0.01,RIGHTB(A1*100,1),0)
(编者注:公式中最后一个0应改为"")