回覆列表
-
1 # huanlubin
-
2 # 於豐邦
先把A1設定成貨幣格式,然後在B2輸入公式:
=IF(AND(A1=-0.99),"負","")&SUBSTITUTE(SUBSTITUTE(TEXT(TRUNC(A1),"[dbnum2]G/通用格式元;負[dbnum2]G/通用格式元")&TEXT(RIGHT(FIXED(A1),2),"[dbnum2]0角0分;[dbnum2]0角;[dbnum2]整"),"零角","零"),"零分",)
先把A1設定成貨幣格式,然後在B2輸入公式:
=IF(AND(A1<=-0.01,A1>=-0.99),"負","")&SUBSTITUTE(SUBSTITUTE(TEXT(TRUNC(A1),"[dbnum2]G/通用格式元;負[dbnum2]G/通用格式元")&TEXT(RIGHT(FIXED(A1),2),"[dbnum2]0角0分;[dbnum2]0角;[dbnum2]整"),"零角","零"),"零分",)