Count Colored Cells in Microsoft Excel - WindowsTips.net - Windows Tips and Tricks with Geek

Thursday, January 27, 2022

Count Colored Cells in Microsoft Excel

 Microsoft Excel Logo

Count Colored Cells Using Find

This first method for counting colored cells is the quickest of the two. It doesn’t involve inserting a function or formula, so the count will simply be displayed for you to see and record manually if you wish.

Select the cells you want to work with and head to the Home tab. In the Editing section of the ribbon, click “Find & Select” and choose “Find.”

Click Find & Select, then Find

When the Find and Replace window opens, click “Options.”

Click Options

Known formatting: If you know the precise formatting you used for the colored cells, for example, a specific green fill, click “Format.” Then use the Font, Border, and Fill tabs in the Find Format window to select the color format and click “OK.”

Find Format window, select formatting

Unknown formatting: If you’re not sure of the exact color or used multiple format forms like a fill color, border, and font color, you can take a different route. Click the arrow next to the Format button and select “Choose Format From Cell.”

Click Choose Format From Cell

When your cursor transforms to an eyedropper, move it to one of the cells you want to count and click. This will put the formatting for that cell into the preview.

Click the cell to obtain the format

Using either of the above two ways to enter the format you’re looking for, you should next check out your preview. If it looks correct, click “Find All” at the bottom of the window.

Click Find All

When the window expands to display your results, you’ll see the count on the bottom left as “X Cell(s) Found.” And there’s your count!

Number of cells found

You can also review the exact cells in the bottom portion of the window, just above the cell count.

Count Colored Cells Using a Filter

If you plan to adjust the data over time and want to keep a cell dedicated to your colored cell count, this second method is for you. You’ll use a combination of a function and a filter.

Let’s start by adding the function, which is SUBTOTAL. Go to the cell where you want to display your count. Enter the following, replacing the A2:A19 references with those for your own range of cells, and hit Enter.

=SUBTOTAL(102,A2:A19)

The number 102 in the formula is the numerical indicator for the COUNT function.

Note: For other function numbers you can use with SUBTOTAL, take a look at the table on Microsoft’s support page for the function.

As a quick check to make sure you entered the function correctly, you should see a count of all cells with data as the result.

Check the Subtotal function

Now it’s time to apply the filter feature to your cells. Select your column header and go to the Home tab. Click “Sort & Filter” and choose “Filter.”

On the Home tab, click Sort & Filter, Filter

This places a filter button (arrow) next to each column header. Click the one for the column of colored cells you want to count and move your cursor to “Filter by Color.” You’ll see the colors you’re using in a pop-out menu, so click the color you want to count.

Move to Filter by Color and pick a color

Note: If you use font color instead of or in addition to cell color, those options will display in the pop-out menu.

When you look at your subtotal cell, you should see the count change to only those cells for the color you selected. And you can pop right back up to the filter button and choose a different color in the pop-out menu to quickly see those counts too.

Examples of counts for colored cells

After you finish getting counts with the filter, you can clear it to see all of your data again. Click the filter button and choose “Clear Filter From.”

Choose Clear Filter From

If you’re already taking advantage of colors in Microsoft Excel, those colors can come in handy for more than just making data stand out.

No comments:

Post a Comment