简体   繁体   English

如何突出显示指定范围内的日期?

[英]How to highlight dates in a specified range?

I have one column ( A ) of dates in Excel, each row representing one day of the year. 我在Excel中有一列( A )日期,每行代表一年中的一天。 I want to highlight a date if it's included in a list of dates ( $C$3:$C$28 ) on the same page. 如果它包含在同一页面上的日期列表( $C$3:$C$28 )中,我想强调一个日期。

I want the date highlighted if it's a pay date that occurs every second Friday (every other Friday). 如果是每隔一个星期五(每隔一个星期五)发生的付款日期,我希望突出显示日期。 I don't want to manually go through and select them piecemeal. 我不想手动完成并逐个选择它们。

I've tried conditionally formatting the range by going to "Conditional Formatting" > "Highlight Cell Rules" > "Equal To" and specifying $C$3:$C$28. 我已尝试通过转到“条件格式”>“突出显示单元格规则”>“等于”并指定$ C $ 3:$ C $ 28来有条件地格式化范围。 This obviously doesn't work. 这显然不起作用。

Is there a conditional formatting formula I can plug in to highlight pay dates in my data range? 是否有条件格式公式我可以插入以突出显示我的数据范围内的付款日期? Or, is there a macro that I can use? 或者,有没有我可以使用的宏?

How about: "Conditional Formatting" > "Highlight Cell Rules" > "Duplicate Cell Values" and select all of Column A and $C$3:$C$28 如何:“条件格式”>“突出显示单元格规则”>“重复单元格值”并选择所有A列和$ C $ 3:$ C $ 28

It will highlight both columns A and C, but A will be highlighted. 它将突出显示A列和C列,但A将突出显示。

A CF formula rule of: CF公式规则:

=AND(WEEKDAY(A1)=6,MOD(COUNT(A$1:A1),2))  

should work for every other Friday. 应该每隔一个星期五工作一次。

For the other Fridays from the above: 从上面的其他星期五:

=AND(WEEKDAY(A1)=6,NOT(MOD(COUNT(A$1:A1),2)))

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

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