MS Excel如果语句不适用于平移公式?

时间:2019-02-14 07:17:39

标签: excel if-statement excel-formula

enter image description here

AE具有公式:

=IF(
              AND([@[IST Time]]>=$AF$1,[@[IST Time]]<$AG$1),"First (6a-3:30p)",
              IF(AND([@[IST Time]]>=$AG$1,[@[IST Time]]<$AH$1),"Second (1:30p-11p)",
              "Third (10p-7:30a)"))

它应该显示Second而不是Third,不确定这里出了什么问题。

1 个答案:

答案 0 :(得分:0)

单元格引用[@[IST Time]]可能存在问题。尝试在单元格AE2中输入以下公式:

=IF(AND(AD2>=$AF$1,AD2<$AG$1), "First (6a-3:30p)",
     IF(AND(AD2>=$AG$1,AD2<$AH$1), "Second (1:30p-11p)", "Third (10p-7:30a)"))