简体   繁体   中英

Date and Time Conditional Formatting

I have dates with times listed and would like to perform conditional formating to color the times that do not match 3:00 AM. I cannot figure it out.

For example:

10/2/17 12:00 AM
10/2/17 3:00 AM
10/3/17 10:00 AM

在条件格式编辑栏中键入以下公式(用您的特定单元格替换A1 ):

= NOT(AND(HOUR(A1)=3,MINUTE(A1)=0))

For conditional formatting in Excel, go to this option on the Home menu. And, select the option New Rule.

Home -> Conditional Formatting -> New Rule -> Format All Cells Based on Their Values

If your date and time both are in a same cell then you have to create a formula in the formatting condition to convert the date/time value into a string value and will need to extract the time portion out of it to apply value based formatting on it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM