Count a list of cells with the same background color

后端 未结 5 1276
时光取名叫无心
时光取名叫无心 2020-12-19 01:22

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?

5条回答
  •  借酒劲吻你
    2020-12-19 01:47

    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

    Example form the site:

    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)

提交回复
热议问题