如果单元格和语句 [英] If cell and statement

查看:82
本文介绍了如果单元格和语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试在excel中使用单元格着色。

We are trying to use cell coloring in excel.

我们希望如果单元格颜色为红色,它将在另一个单元格中给出数字答案。例如如果单元格A2为红色,则单元格B2中为8。

We would like that if a cell color is red it will give a numeric answer in another cell. For e.g. if cell A2 is red then in cell B2 it will be 8.

有人知道不使用VBA怎么做吗?

Does anyone knows how to do it without using VBA?

推荐答案

没有Excel工作表函数可以评估另一个单元格的颜色。

There is no Excel worksheet function that can evaluate the colour of another cell.

即使您发明了一个函数和wing语法,它将不起作用。

Even if you invent a function and wing the syntax, it will not work.

Cell()函数有一个 color参数,但是不能识别颜色。如果单元格的颜色设置为负值,则返回1;否则返回1。否则返回0(零)。

The Cell() function has a "color" argument, but that does not identify the color. It returns 1 if the cell is formatted in color for negative values; otherwise returns 0 (zero).

https://support.office.com/zh-cn/article/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf?NS=EXCEL&Version=16&SysLcid=1033&UiLcid= 1033& AppVer = ZXL160& HelpId = xlmain11.chm60173& ui = zh-CN& rs = zh-CN& ad = US

所以,您

您可能想转移范式。

而不是手动进行为单元格着色,请使用条件格式。可以重复使用用于得出条件格式的逻辑,以在电子表格的其他单元格中产生值。

Instead of manually coloring a cell, use conditional formatting. The logic that is applied to arrive at the conditional format can be re-used to produce values in other cells of the spreadsheet.

这篇关于如果单元格和语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆