
In a similar way you can count cells and sum cells' values by font color using the CountCellsByFontColor and SumCellsByFontColor functions, respectively. column in our table), you can add up the values based on a certain color by using an analogous SumCellsB圜olor function:Īs demonstrated in the screenshot above, we used the formula =SumCellsB圜olor(D2:D14,A17) where D2:D14 is the range and A17 is the cell with a color pattern. If you have numerical data in colored cells (e.g. In a similar way, you write the formula for the other colors you want to count, yellow and green in our table. In this example, we use the formula =CountCellsB圜olor(F2:F14,A17) where F2:F14 is the range containing color-coded cells you want to count and A17 is the cell with a certain background color, a red one in our case. Now that all "behind the scenes" work is done for you by the just added user-defined function, choose the cell where you want to output the results and enter the CountCellsB圜olor function into it:
#HOW TO COUNT A COLOR IN EXCEL HOW TO#
If you are not very comfortable with VBA, you can find the detailed step-by-step instructions and a handful of useful tips in this tutorial: How to insert and run VBA code in Excel. Save your workbook as " Excel Macro-Enabled Workbook (.xlsm)".

Now, you need to sum or count cells which is based on the background color in active worksheet. If you have any worksheet which have range of cells with lot of background colors.


Must Read: How to Search Duplicate Values with VLookup functionįor eg. But if you don’t have enough time and want to get quick result then what you have to do? Now, there is no need to worry in this guide we have to discuss how to sum or count cells based on background color in Excel. In that situation, if you do this job manually then it will take lot of time. By default Excel does not have any formula to calculate the sum or count cells based on background color in Excel. Sometime you need to use sum or count certain cells which is based on the background color in Excel. In this guide we have to discuss how to sum or count cells based on background colors in Excel. It is not an easy task to get the proper answer in quick way. Now if someone ask you how to sum or count cells based on background color in Excel. Suppose during working on Excel, if you get a worksheet in which there are different kind of background colors in range of cells.
