简体   繁体   English

根据 excel 中今天的年份和月份列突出显示整行

[英]highlighting entire row based on today's year and month columns in excel

I have two columns Year and Month as below in my excel. I would like to highlight entire row based on two columns Year and Month.我的 excel 中有两列年份和月份,如下所示。我想根据年份和月份两列突出显示整行。 So, whenever I open the excel, the current row is highlighted.因此,每当我打开 excel 时,当前行都会突出显示。 For example, if I open the excel today, it should already highlight the current row for 2022,November and when I open in december, it should already highlight 2002,december.例如,如果我今天打开 excel,它应该已经突出显示 2022 年 11 月的当前行,而当我在 12 月打开时,它应该已经突出显示 2002 年 12 月。 Like wise, I have data for several years.像wise一样,我有好几年的数据。 I tried searching for the answers, most are telling how to highlight rows and columns on selection.我试着寻找答案,大多数都在讲述如何在选择时突出显示行和列。 But here I need the highlighting to be done automatically based on year and month.但在这里我需要根据年份和月份自动完成突出显示。

在此处输入图像描述

Please suggest how to perform this.请建议如何执行此操作。

在此处输入图像描述

My conditional formatting rule is based on this formula:我的条件格式规则基于以下公式:

=ROW(A2)-1=MONTH(TODAY())

But if you have data for several years probably you'll need the CF rule to be applied to all rows in worksheet and that's a terrible idea because CF rules can really overcharge files.但是,如果您有数年的数据,您可能需要将 CF 规则应用于工作表中的所有行,这是一个糟糕的主意,因为 CF 规则确实会使文件收费过高。

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

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