如果单元格包含的日期少于今天格式化单元格 [英] Format cell if cell contains date less than today

查看:336
本文介绍了如果单元格包含的日期少于今天格式化单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取一行的条件格式,当该行中的单元格包含的日期小于或等于今天(昨天,今天,上周等)

I am trying to get conditional formatting for a row for when a cell in that row contains a date less than or equal to today (yesterday, today, last week etc)

我试过 = IF($ W $ 4,TODAY()),如果单元格等于今天的日期,但我无法弄明白如何使其工作因为如果单元格等于今天或小于今天。

I have tried =IF($W$4,TODAY()) which works for if the cell equals today's date, but I cannot figure out how to make it work for if cell is equal to today or less than today.

此外,是否可以将此条件格式设置复制到列中的每个单元格,但仅影响单元格的行?还有这样,如果空白,单元格保持高亮,这是对的吗?像 = IF(ISBLANK()),IF($ W $ 4 <= TODAY())

Also, is it possible to now copy this conditional formatting to work for every cell in the column, but only affect the cell's row? Also with this the cell stays hightlighted if it is left blank, is this right? like =IF(ISBLANK()),IF($W$4<=TODAY())

推荐答案

您的第一个问题是您没有正确使用您的比较符号。

Your first problem was you weren't using your compare symbols correctly.

< less than
> greater than
<= less than or equal to
>= greater than or equal to

回答您的其他问题;获得条件在列中的每个单元格上工作,空白如何?

To answer your other questions; get the condition to work on every cell in the column and what about blanks?

空白如何?

添加一个额外的 IF 条件,以检查单元格是否为空,如果不为空,执行检查。 = IF(B2 =,,B2< = TODAY())

Add an extra IF condition to check if the cell is blank or not, if it isn't blank perform the check. =IF(B2="","",B2<=TODAY())

在列中的每个单元格

这篇关于如果单元格包含的日期少于今天格式化单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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