Excel 2007 - 条件格式 - 根据单元格区域中的值设置单元格格式
我必须使用以下公式根据一系列单元格设置单元格格式。
=IF($D$35=$AD$34+$A$3,1,IF($D$36=$AD$34+$A$3,1,IF($D$37=$AD$34+$A$3, 1,如果($D$38=$AD$34+$A$3,1,如果($D$39=$AD$34+ $A$3,1,IF($D$40=$AD$34+$A$3,1,IF($D$41=$AD$34+$A$3,1,IF($D$42=$AD$34+$A $3,1,IF($D$43=$AD$34+$A$3,1,0))))))))
单元格范围为 D35 至 D43。需要满足的条件是特定日期(由AD34+A3指定)。上面的公式完美运行。但是,我知道有更好的方法。我尝试使用 INDIRECT 和 OFFSET 命令来指定单元格范围。我无法获得正确的语法。
我已经为此工作了好几天了,有人可以告诉我我缺少什么吗?我更喜欢不需要 VBL 的解决方案。
I have to use the following formula to format a cell based on a range of cells.
=IF($D$35=$AD$34+$A$3,1,IF($D$36=$AD$34+$A$3,1,IF($D$37=$AD$34+$A$3,1,IF($D$38=$AD$34+$A$3,1,IF($D$39=$AD$34+$A$3,1,IF($D$40=$AD$34+$A$3,1,IF($D$41=$AD$34+$A$3,1,IF($D$42=$AD$34+$A$3,1,IF($D$43=$AD$34+$A$3,1,0)))))))))
The range of cells is D35 to D43. The condition to be met is a specific date (designated by AD34+A3). The formula above works perfectly. However, I know there is a better way. I have tried using INDIRECT, and OFFSET commands to specify the range of cells. I have not been able to get the syntax right.
I have worked on this for days, can someone please show me what i am missing? I would prefer a solution that does not require VBL.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
=IFERROR(匹配(AD34+A3,D35:D43,0),0)
=IFERROR(MATCH(AD34+A3,D35:D43,0),0)