每行的 Excel 条件格式
我想要实现的是对表中的行进行条件格式化,以查找基于旧表备份的更改。
如果对表进行了任何更改并且与备份不匹配,则执行更改的行将更改其样式。
我设法做的是添加一个公式:
=IF(OR(B2<>'1LinkBU'!B2,C2<>'1LinkBU'!C2,D2<>'1LinkBU'!D2),1,0)
检查行是否不等于备份表上的对应行。如果该行中发生任何更改,则公式单元格的值为 1。然后在条件格式中我选择了第二行,在公式中我说如果 E2 = 1
则格式有效。
问题是,这个表应该会增长很多,并且由不知道如何使用公式的用户使用,而且为每个原始数据输入特定的条件格式确实不方便。
另外,在我上传的链接文件中,我记录了一个宏,该宏创建我想要的行样式,但我不知道如何创建使用它的代码。
是否可以遍历 row2 直到最后一行,并对 E 列中的每个“1”值应用行样式到整行?
What I am trying to achieve is a conditional formatting of rows in a table looking for changes based on a backup of an older table.
If there were any change to the table and it doesn't match the backup, then the row where the change was performed will change it's style.
What I managed to do is to add a formula:
=IF(OR(B2<>'1LinkBU'!B2,C2<>'1LinkBU'!C2,D2<>'1LinkBU'!D2),1,0)
Checking if the rows are not equal to their counterparts on the backup table. If anything was changed in this row the formula cell gets a value of 1. And then in the conditional formatting I selected the second row and in the formula I said that if E2 = 1
then the formatting is valid.
The thing is, this table supposed to grow a lot and be used by users who doesn't know how to use formulas as well as it really isn't convenient to enter a specific conditional formatting for each raw.
Also, in the linked file I uploaded I recorded a macro that creates the row style I want but I don't know how to create a code that will use it.
Is it possible to go through row2 down to what ever will be the last row and for each "1" value in the E column apply the Row style to the whole row?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,显然我只是想太多了!实际上做起来非常简单......我所要做的就是将公式从 =$E$2=1 更改为 =($E2=1) 并将条件格式应用于表格的整个范围。
OK apparently I was just over thinking this! It was actually very simple to do... all I had to do is change the formula from =$E$2=1 into =($E2=1) and apply the conditional formatting to the whole range of the table.