简体   繁体   中英

Seeking conditional formatting formula based on date and another cell's value

Example:

例

  • if status is 'closed' then due due date is [green]
  • if status is 'major' or 'minor' and overdue based on TODAY, then due date is [red]
  • if not overdue or 'closed', due date format is [clear]

Create two rules:

Conditional Formatting > New Rule > Use a formula to determine which cells to format

Green: = A1 = "Closed"
Red: = AND(OR(A1="major", A1="minor"),B1<NOW())

Apply desired format.


Your rules should look like below once complete. To get to this screen to check:

Conditional Formatting > Manage Rules

在此处输入图片说明

You need two conditional formatting. (Apply to B:B )

For Green:

=IF(A2="Closed",TRUE,FALSE)

For Red:

=IF(AND(OR(A2="Minor",A2="Major"),B2<TODAY(),B2<>""),TRUE,FALSE)

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