发布网友 发布时间:2022-04-22 21:47
共2个回答
热心网友 时间:2023-05-19 09:05
if函数与int函数共用,if用于判断,int作为函数用于强制类型转换关系当一个浮点数需要与一个整数进行判断时,你可以将浮点数转换为整数来进行判断if((int)浮点变量==整形变量)热心网友 时间:2023-05-19 09:06
=IF(ROUND(G8,2)<0,"无效数值",IF(ROUND(G8,2)=0,"零",IF(ROUND(G8,2)<1,"",TEXT(INT(ROUND(G8,2)),"[dbnum2]")&"元")&IF(INT(ROUND(G8,2)*10)-INT(ROUND(G8,2))*10=0,IF(INT(ROUND(G8,2))* (INT(ROUND(G8,2)*100)-INT(ROUND(G8,2)*10)*10)=0,"","零"),TEXT(INT(ROUND(G8,2)*10)-INT(ROUND(G8,2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(G8,2)*100)-INT(ROUND(G8,2)*10)*10)=0,"整",TEXT((INT(ROUND(G8,2)*100)-INT(ROUND(G8,2)*10)*10),"[dbnum2]")&"分")))