EXCEL表中将金额拆分成元角分格式的,即:A1是金额50000000,,如何做千佰十万千百拾元角分单元格的公式
1个回答
展开全部
N1输入
=IF(COLUMN(M1)-(COLUMN($M1)-LEN(INT($A1)))=0,"¥",IF(COLUMN(M1)-(COLUMN($M1)-LEN(INT($A1)))<0,"",MID(INT($A1),COLUMN(M1)-(COLUMN($M1)-LEN(INT($A1))),1)))
然后向左复制(向左左左,别弄错)
O1输入
=IF(MOD($A$1*10^(COLUMN(A1)-1),1)=0,0,MID(ROUND(MOD($A$1,INT($A$1)),2),3+(COLUMN(A1)-1),1))
向右复制到P1
如果是转换大小写,在A2输入
=IF(OR(A1<=0,COUNTBLANK(A1)),"",TEXT(INT(A1),"[dbnum2]")&IF(INT(A1)=A1,"元整","元")&IF(INT(A1)=A1,"",TEXT(--RIGHT(INT(A1*10)),IF(--RIGHT(INT(A1*100))>0,"[=0]零;[dbnum2]#角","[dbnum2]#角;;;"))&TEXT(--RIGHT(A1*100),"[dbnum2]#分;;;")))
=IF(COLUMN(M1)-(COLUMN($M1)-LEN(INT($A1)))=0,"¥",IF(COLUMN(M1)-(COLUMN($M1)-LEN(INT($A1)))<0,"",MID(INT($A1),COLUMN(M1)-(COLUMN($M1)-LEN(INT($A1))),1)))
然后向左复制(向左左左,别弄错)
O1输入
=IF(MOD($A$1*10^(COLUMN(A1)-1),1)=0,0,MID(ROUND(MOD($A$1,INT($A$1)),2),3+(COLUMN(A1)-1),1))
向右复制到P1
如果是转换大小写,在A2输入
=IF(OR(A1<=0,COUNTBLANK(A1)),"",TEXT(INT(A1),"[dbnum2]")&IF(INT(A1)=A1,"元整","元")&IF(INT(A1)=A1,"",TEXT(--RIGHT(INT(A1*10)),IF(--RIGHT(INT(A1*100))>0,"[=0]零;[dbnum2]#角","[dbnum2]#角;;;"))&TEXT(--RIGHT(A1*100),"[dbnum2]#分;;;")))
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询