计算具有相同背景颜色的单元格列表 [英] Count a list of cells with the same background color

查看:143
本文介绍了计算具有相同背景颜色的单元格列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个单元格都包含一些文本和背景颜色。所以我有一些蓝色的细胞,有些是红色的细胞。我使用什么功能来计算红色单元格的数量?

Each cell contains some text and a background color. So I have some cells that are blue and some that are red. What function do I use to count the number of red cells?

我尝试过 = COUNTIF(D3:D9,CELL(color D3))没有成功(其中 D3 是红色)。

I have tried =COUNTIF(D3:D9,CELL("color",D3)) with no success (Where D3 is red).

推荐答案

Excel无法通过内置函数收集该属性。如果你愿意使用一些VB,所有颜色相关的问题都在这里回答:

Excel has no way of gathering that attribute with it's built-in functions. If you're willing to use some VB, all your color-related questions are answered here:

http://www.cpearson.com/excel/colors.aspx

网站示例:


SumColor函数是SUM和SUMIF
函数的基于颜色的
模拟。它允许您为
颜色索引要检查的范围指定
单独的范围,
将其值为
的单元格范围相加。如果这两个范围是
相同,则该函数将单元格
的颜色与指定的
值匹配。例如,以下
公式将B11:B17
中的值填充为填充颜色为红色。

The SumColor function is a color-based analog of both the SUM and SUMIF function. It allows you to specify separate ranges for the range whose color indexes are to be examined and the range of cells whose values are to be summed. If these two ranges are the same, the function sums the cells whose color matches the specified value. For example, the following formula sums the values in B11:B17 whose fill color is red.

= SUMCOLOR (B11:B17,B11:B17,3,FALSE)

这篇关于计算具有相同背景颜色的单元格列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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