简体   繁体   English

在单元格中使用日期 + 时间的条件格式 TODAY()

[英]Conditional Formatting TODAY() with Date + Time in cell

What I am trying to do is highlight cells that contain both a date and time together, I would like it to ignore the time and highlight the cell if the date is equal to TODAY.我要做的是突出显示同时包含日期和时间的单元格,如果日期等于今天,我希望它忽略时间并突出显示单元格。

For example:例如:

-| A | B | 1 | Option1 | 06/17/2020 0800 | 2 | Option2 | 06/17/2020 1500 | 3 | Option1 | 06/18/2020 2300 | 4 | Option1 | 06/20/2020 0800 |

I would want B1 and B2 highlighted if today was 06/17/2020.如果今天是 2020 年 6 月 17 日,我希望突出显示 B1 和 B2。

I tried a few different formulas in conditional formatting I found on Google, but with no luck.我尝试了一些在谷歌上找到的条件格式的不同公式,但没有运气。 Thank you!谢谢!

Use a rule based on the following formula:使用基于以下公式的规则:

=--(LEFT($B1,10))=TODAY()

Apply to column B.适用于 B 列。

在此处输入图像描述

Note that this assumes that the date portion is always in the format mm/dd/yyyy, ie it takes up the 10 left characters.请注意,这假定日期部分始终采用 mm/dd/yyyy 格式,即它占用了左边的 10 个字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将单元格中的日期与 today() 进行条件格式比较 - compare date in cell with today() for conditional formatting 如果日期在今天之前且相邻单元格为空,则进行条件格式设置 - Conditional formatting if date is before today AND adjacent cell is empty 如果单元格中的日期为“今天”,则为条件语句 - Conditional statement if date in cell is 'today' 日期和时间条件格式 - Date and Time Conditional Formatting 条件格式基于今天以外的日期 - Conditional Formatting based of date other the Today 如何启用条件格式,以便当今天的日期变为上一个单元格的日期+工作日时单元格变为红色? - How to enable conditional formatting so that a cell becomes red whenever today's date becomes previous cell's date + work days? Excel条件格式 - 从今天突出显示日期范围 - Excel Conditional Formatting - Highlight Date Range From Today Excel条件格式-突出显示具有TODAY的下一个日期的行 - Excel Conditional Formatting - Highlight row with the next date from TODAY 在Excel中,是否可以使用条件格式来始终突出显示今日的日期? - In Excel, is it possible to use conditional formatting to always highlight TODAY's date? 基于另一个单元格中的日期的条件格式 - Conditional formatting based on date in another cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM