我在excel中想用sheet1中B1-A1在sheet2的A1中得到结果(且A1>=B1时,sheet2的A1结果为a1,数据空白时,

2024-11-22 19:01:42
推荐回答(3个)
回答(1):

sheet2的A1单元格输入公式

当sheet1中A1,B1其中一个为空格时,返回空值
=IF(OR(SHEET1!A1="",SHEET1!B1=""),"",IF(SHEET1!A1
当sheet1中A1,B1都为空格时,返回空值
=IF(AND(SHEET1!A1="",SHEET1!B1=""),"",IF(SHEET1!A1

回答(2):

=IF(AND(ISBLANK(Sheet1!A1),ISBLANK(Sheet1!B1)),"",IF(Sheet1!A1>Sheet1!B1,Sheet1!A1,Sheet1!B1-Sheet1!A1))
是sheet2的A1单元格的公式

回答(3):

还有一种情况没有说,否则公式不够完善,A1大于等于B1时,sheet2的A1结果为a1,数据空白时sheet2的结果也为空白,那么A1小于B1时SHEET2的结果显示什么呢?