如果陈述和补充

时间:2015-06-15 13:07:25

标签: excel excel-2010

我试图查看第二张中的单元格值是否等于空白,然后检查其他单元格的值是否小于3并进一步将该值更新为1或0.

第一个条件,如果第二张纸中的g2单元格值不等于空白,则检查f5单元格值。如果f5单元格值小于3,则应显示为1,否则为0

=sheet2!NOT(ISBLANK($G2)) + IF($F5>2, 0, 1)

由于

1 个答案:

答案 0 :(得分:1)

First, your formula =sheet2!NOT(ISBLANK($G2)) + IF($F5>2, 0, 1) is not using proper Excel syntax. The sheet reference goes with the cell reference, not outside the general formula. Also, your formula checks if F5 is greater than 2, not less than 3.

There are 2 conditions : 1st to check the cell value in sheet2 is not blank.

NOT(ISBLANK(Sheet2!$G2)) checks this.

2nd cond to check if the cell value f5 in sheet2 is less than 3

The logical condition $F5 < 3 checks this.

than put value as 1 else 0 in sheet1 cell.

IF(condition(s), 1, 0)

so both the conditions should get satisfy.

Now you want to check that both conditions are met, so you need an AND() function in your IF() function's logical test argument: =IF(AND(), 1, 0)

Or to put it together: IF(AND(NOT(ISBLANK(sheet2!$G2)), $F5 < 3), 1, 0)