Count by Color in Google Sheets
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDZAefuF-Bvyr4G4n7TzQZFvw2-PJ1bJVlVKMsCvK9QI8RF25GYVVkfvjy282PSZc58yRO6ZwiycnqQw72C9c9FLHX3Fts99ROfcvqNrfLGY0RdUZel9Xop1zmsyqyGHNhFtM5k_ylb10viPqy6PrZlyHSxxyGpwGLqbJlho3RmVa0hT6xPfbAPouY/w640-h176/Screen%20Shot%202023-02-03%20at%2014.27.13.png)
Hello everybody! Are you familiar with the function COUNTIF in Google Sheets? You can count how many cells match a certain criteria from a range. But what if what you need is to count the color of the cells? That is not currently possible. I came across a situation in which I had applied individual conditional formatting to 25 different columns. The words didn't match amongst them, but the colors were the significant piece. I needed to count how many cells had a certain color. I Googled and looked to see if anyone had gone through a similar situation. Yay! I came across exactly what I needed! Count Cells by Color (link here!) Here's the website I found. It shows 3 different methods. I chose to use Method 1. This method requires you add a script to your sheet. The link provides the script. All you have to do is copy/paste and follow the instructions. Once you have added the script you can start using the new function " =countColoredCells(RANGE, DESTINATION COLOR) "....