简体   繁体   English

日期突出显示公式Excel条件格式

[英]Date Highlight Formula Excel conditional formatting

I making a leave Planner which highlight the calendar as per the dates using these formulas 我做了一个假期计划者,使用这些公式按日期突出显示日历

=IF(B6="",FALSE,SUMPRODUCT((B6>=INDIRECT("Table1[Start]"))*(B6<=INDIRECT("Table1[End]"))))

=IF(B6="",FALSE,SUMPRODUCT((B6>=INDIRECT("Table1[SD1]"))*(B6<=INDIRECT("Table1[ED1]"))))

I want to apply this formula on same row not on columns how i can give range of Rows or range of cells containing start dates and end dates so same color highlight for one row and other color for other row 我想在同一行而不是列上应用此公式,我如何才能给出行的范围或包含开始日期和结束日期的单元格的范围,所以一行显示相同的颜色突出显示,另一行显示其他颜色

在此处输入图片说明

The formulas would be: 计算公式为:

=OR(SUMPRODUCT((B6<>"")*("abc"=INDIRECT("Table1[Names]"))*(B6>=INDIRECT("Table1[Start]"))*(B6<=INDIRECT("Table1[End]"))),SUMPRODUCT((B6<>"")*("abc"=INDIRECT("Table1[Names]"))*(B6>=INDIRECT("Table1[SD1]"))*(B6<=INDIRECT("Table1[ED1]"))),SUMPRODUCT((B6<>"")*("abc"=INDIRECT("Table1[Names]"))*(B6>=INDIRECT("Table1[SD1]"))*(B6<=INDIRECT("Table1[ED1]"))))

As you can see you will need to have a different rule for each name. 如您所见,您将需要为每个名称设置不同的规则。 And change the name. 并更改名称。

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

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