如何在Excel中逐行计算有色单元格
我有一个在Excel中的报告,其中有三行,并有条件格式以对数据进行涂抹。我本质上希望第四列输出1,如果该行中的至少两个单元格为绿色,则为0。示例:该行中的任何两个单元均可为绿色
所以我希望一个公式在E4中输出1,但对于E列的其余部分。这是可能的吗?
I have a report in excel with three rows with conditional formatting to color map the data. I essentially want the fourth column to output a 1 if at least two cells within the row are green and a 0 if not. Example:any two cells in the row can be green
So I would like a formula to output a 1 in E4 but 0 for the rest of column E. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须创建这样的VBA函数:
绿色已将RGB设置为RGB(0、255、0),但您可以更改为想要使用的任何颜色
使用方式:
最好的问候。
You have to create a VBA function like this:
The green color has been set to RGB (0, 255, 0) but you can change to any color you want
Way to use:
Best regards.
我可以想到两个选项:
创建一个与条件格式一致的公式 - 以前的贡献者已经提出了这一点。但是,这实际上没有检查单元颜色。
使用VBA脚本。这可以评估单元颜色,并且可以在事件驱动的情况下进行设置,因此它会在新的工作表条目上自动运行。
There are two options that I can think of:
create a formula that aligns with the conditional formatting - this has already been suggested by previous contributors. However, this does not actually check cell colors.
use a vba script. This can assess cell colors and can be setup as event driven so it runs automatically upon a new worksheet entry.