简体   繁体   English

寻求基于日期和另一个单元格的值的条件格式公式

[英]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] 如果状态为“主要”或“未成年人”,且已根据TODAY过期,则到期日期为[红色]
  • 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" 绿色: = A1 = "Closed"
Red: = AND(OR(A1="major", A1="minor"),B1<NOW()) 红色: = 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 ) (适用于B:B

For Green: 对于绿色:

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

For Red: 对于红色:

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

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

相关问题 基于另一个单元格中的日期的条件格式 - Conditional formatting based on date in another cell 基于另一个单元格中日期的条件格式Excel - Conditional Formatting Excel Based On Date In Another Cell 如何基于单元格公式的结果应用条件格式 - How to apply conditional formatting based on the result of a cell's formula 条件格式,使用公式根据不同的单元格值范围进行格式化 - Conditional Formatting, using an formula to format based on different cell value range 根据公式中单元格中的值有条件地格式化 Excel 工作表选项卡 - Conditional Formatting an Excel Sheet Tab Based on Value in a Cell From a Formula 基于具有条件格式的单元格公式的单元格着色器 - Cell shader based on cell formula with conditional formatting 包含来自另一个单元格的值的条件格式文本的公式 - Formula to conditional formatting text that contains value from another cell 基于单元格中IF公式结果的条件格式 - Conditional formatting based on the result of IF formula in the cell 基于其他单元格值的背景色和文本的条件格式 - Conditional Formatting for background color and text based another cell value Excel 公式和条件格式:如何根据条件匹配另一个表中的当前单元格 - Excel Formula & Conditional Formatting: How to match current cell in another table based on criteria
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM