Format cell if cell contains date less than today

匿名 (未验证) 提交于 2019-12-03 03:06:01

问题:

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)

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.

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())

回答1:

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?

What about blanks?

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())

Condition on every cell in column



回答2:

=$W$4<=TODAY() 

Returns true for dates up to and including today, false otherwise.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!