Excel IF 函数、True、False 或空白 [英] Excel IF Function, True, False, or Blank

查看:52
本文介绍了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 或空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆