本文介绍了Excel IF函数,True,False或空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前正在尝试比较两个日期,以确定是否在SLA日期之内提交了文件

Currently trying to compare two dates to work out whether a document has been submitted within SLA dates

我有3个单元格

H5 (SLA target date)
T5 (Document submitted date)
U5 (In SLA or Not) Y/N

U5 of = IF(T5-H5< = 1,"Y","N")

但是,对于尚不包含任何内容的单元格,该公式在列中返回true.

But the formula is returning true down the column for cells which contain no content yet.

如何在U列中返回Y,N或0(或空白)?

How do I return either a Y, N, or 0 (or blank) in column U?

推荐答案

=IF(OR(ISBLANK(T5),ISBLANK(H5)),0,IF(T5-H5<=1,"Y","N"))

如果您希望单元格为空白,则可以用"更改0.

You can change 0 with "" if you want the cell to be blank.

这篇关于Excel IF函数,True,False或空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 17:34