How to Count Colored Cells In Excel Without Using VBA – 3 Methods

The Excel file contains information about students from different countries in a university. The Country is color-coded.

The image below shows the count of cells belonging to the same country.

How to Count Colored Cells In Excel Without VBA


Method 1: Count Coloured Cells Using the Find & Replace Tool in Excel

Step 1:

  • Press CTRL+F to open Find and Replace.
  • Click Find and Replace >>> Options.

Count Coloured Cells Using the Find & Replace Tool in Excel

  • Click Format.

Count Coloured Cells Using the Find & Replace Tool in Excel

Step 2:

  • Click Choose Format From Cell in Find Format.

Count Coloured Cells Using the Find & Replace Tool in Excel

  • A color picker eye-dropper will be displayed. Move the eye-dropper to C5 and pick the color of the cell.

Count Coloured Cells Using the Find & Replace Tool in Excel

  • If you left-click the cell with the eye-dropper placed on it, you will see the Preview.
  • Click Find All.

Count Coloured Cells Using the Find & Replace Tool in Excel

  • Find all the cells filled with the same color.

Count Coloured Cells Using the Find & Replace Tool in Excel

  • You can also find cells filled with other colors, as shown below.

Count Coloured Cells Using the Find & Replace Tool in Excel


Method 2 – Applying the Table Filter to Count Coloured Cells in Excel

Step 1:

  • Select all the cells in the data range with the column headers.
  • Press CTRL+T to activate the Table Filter.
  • In Create Table, enter the entire data range ($B$4:$C$C14) using an absolute reference.
  • Click OK.

Apply the Table Filter to Count Coloured Cells in Excel

Step 2:

  • Table Design will be active.
  • The column headers of the new table display a small downward arrow at the down-right corner.
  • Click the arrow in Country.
  • Click Filter by Color.
  • A dropdown menu with all the colors used will be displayed. Click yellow (that represents Sweden).

Apply the Table Filter to Count Coloured Cells in Excel

A new row, named Total, displays the total number of yellow cells.

total number of cells

You can also find cells filled with other colors. The image below shows the green cells.

Apply the Table Filter to Count Coloured Cells in Excel


Method 3 – Using the Name Manager Feature to Count Colored Cells in Excel

Step 1:

  • Click Formulas and select Name Manager.

Name Manager from Formulas Tab

  • In Name Manager, click New.

Use the Name Manager Feature to Count Coloured Cells in Excel

Step 2:

  • Enter COLOREDCELL as the name of the new function.
  • Enter the following function in Refers to.
  • Click OK.
=GET.CELL(38, COLORED!C5)

Formula Breakdown:

  • GET.CELL is a function based on a VBA macro. This function takes the first cell of the column with all colored cells as an argument. It returns the color code of that cell.

GET.CELL Formula

  • Click Close.

Use the Name Manager Feature to Count Coloured Cells in Excel

Step 3:

  • If you start to enter the formula COLOREDCELL in D5, you will see that Excel will suggest the function.
  • Click the suggested formula.

Use the Name Manager Feature to Count Coloured Cells in Excel

It returns the color code of C5.

color code of cell C5

  • Drag the fill handle to apply the formula to the rest of the cells.

drag the fill handle

All color codes for the cells in the Country column are displayed.

Use the Name Manager Feature to Count Coloured Cells in Excel

Step 4:

  • Enter the following formula in G7 to count the total number of cells associated with each color.
=COUNTIF($D$5:$D$14,COLOREDCELL)

Formula Breakdown:

  • COUNTIF function takes $D$5:$D$14 and the function COLOREDCELL as arguments. It returns the count of cells associated with each color.

Use the Name Manager Feature to Count Coloured Cells in Excel

  • Press ENTER to see the total number of red cells.

Use the Name Manager Feature to Count Coloured Cells in Excel

  • Drag the fill handle to apply the formula to the rest of the cells.

drag the fill handle

You will see the total number of colored cells for each color.

total number of cells


Quick Notes

  • Though a VBA macro is not used, the CELL function is based on it. Save the workbook as Excel Macro-Enabled Workbook or in  XLSM format.

Download Practice Workbook

Download the practice book.


 

<< Go Back to Colored Cells | Count Cells | Formula List | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
ASM Arman
ASM Arman

Abu Saleh Arman is a Marine engineer and Excel & VBA expert. He loves programming with VBA. He finds VBA programming a time-saving tool to manipulate data, handle files, and interact with the internet. He is very interested in Python, MATLAB, PHP, Deep Neural Networks, and Machine Learning, showcasing his diverse skill set. Arman holds a B.Sc in Naval Architecture & Marine Engineering from BUET, Bangladesh. However, he switched to a content developer, where he writes technical content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo