Excel 中的条件格式问题 - 公式帮助
我需要一个用于条件格式的宏。我需要如果一行包含一个为 1 的单元格,那么我需要突出显示整行(例如 A1 - E1)。
目前我只设法突出显示包含数字 1 的单元格,而不是整行。有什么想法吗?
提前致谢
I need a macro to be used in conditional formatting. I need that if a row contains a cell that is 1, then i need that the whole row is highlighted (e.g. A1 - E1).
at the moment i only managed to highlight the cells containing number 1, but not the whole row. any ideas ?
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要在 Excel 中执行此操作,请选择 A1:E1,然后选择“格式”>“A1:E1”。条件格式...>式为>
=SUMIF($A1:$E1,"=1")>0
。不要忘记$
美元符号,以指定对 A 到 E 列的绝对(而不是相对)引用!这是在宏中执行相同操作的 VBA 代码:
To do it in Excel, select A1:E1, then Format > Conditional Formatting... > Formula Is >
=SUMIF($A1:$E1,"=1")>0
. Don't forget the$
dollar signs, to specify an absolute (and not a relative) reference to columns A to E!This is the VBA code to do the same thing in a macro: