excel中如果A1和B1都是负数,B1⼀A1的结果显示为负数;且a1或b1为零时,显示的数值#DIV⼀)0!改为空格

2024-11-29 19:45:06
推荐回答(5个)
回答(1):

这是2种情况还是一种?
先给你2种情况的:
1、=IF(A1<0,IF(B1<0,-B1/A1,),)
2、=IF(A1=0,,IF(B1=0,,B1/A1))
一种情况:
=IF(A1<=0,IF(B1<=0,IF(A1=0,,-B1/A1),),)

回答(2):

=if(and(a1<0,b1<0),-b1/a1,if(or(a1=0,b1=0)," ",b1/a1) )

回答(3):

=IF(AND(A1<0,B1<0),-B1/A1,IF(A1*B1=0,"",B1/A1))

回答(4):

不是很明白你的意思。尝试如下:
=if(and(A1<0,B1<0),-B1/A1,if(and(A1=0,B1=0),"",B1/A1))

回答(5):

=IF(ISERROR(B1/A1),"",IF(B1/A1=0,"",IF(AND(A1<0,B1<0),-B1/A1,B1/A1)))