• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
EDUCBA

EDUCBA

MENUMENU
  • Resources
        • Excel Charts

          • Histogram Chart Excel
          • Basic Excel Formulas
          • Text to Columns in Excel
        • Excel Charts
        • Excel Tips

          • Excel Gantt Chart
          • IFERROR with VLOOKUP
          • Data Table in Excel
        • Excel Tips
        • Excel Tools in Excel

          • Stacked Column Chart
          • Cheat Sheet of Excel Formulas
          • Excel Data Validation
        • Histogram chart in excel
        • Others

          • Resources (A-Z)
          • Excel Functions
          • Financial Functions in Excel
          • Logical Functions in Excel
          • Lookup Reference Functions in Excel
          • Maths Function in Excel
          • TEXT and String Functions in Excel
          • View All
  • Free Courses
  • All Courses
        • Certification Courses

          Excel Course 1
        • All in One Bundle

          All-in-One-Excel-VBA-Bundle
        • Excel course

          Excel-Training
        • Others

          • Excel advanced course
          • VBA Course
          • Excel Data Analysis Course
          • Excel for Marketing Course
          • Excel for Finance Course
          • View All
  • 120+ Courses All in One Bundle
  • Login

Count Colored Cells in Excel

Home » Excel » Blog » Excel Tips » Count Colored Cells in Excel

Count Colored Cells in Excel

Count Colored Cells in Excel (Table of Contents)

  • Introduction to Count Colored Cells in Excel
  • How to Count Colored Cells in Excel?

Introduction to Count Colored Cells in Excel

We all are well aware of the fact that COUNT and COUNTIF functions are the ones that can be used to count the cells with numbers and cells that follow any specific criteria. Isn’t it being fancy to have a function which counts the colored cells? I mean something that counts different cells based on their color? Unfortunately, there is no such function directly available in Excel. However, we can use a combination of different functions to achieve the same. Thanks to the versatility of Microsoft Excel. Therefore, here are the methods using which we can count the number of colored cells in Excel.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

  • Using SUBTOTAL formula and color filters.
  • Using COUNTIF and GET.CELL to count colored cells.

How to Count Colored Cells in Excel?

Let’s understand how to Count Colored Cells in Excel with a few examples.

You can download this Count Colored Cells Excel Template here – Count Colored Cells Excel Template

Example #1 – Using SUBTOTAL Formula and Color Filters

Suppose we have data of 1000 colored rows as shown below and all we wanted is to find out the count of each color within entire data. See the partial layout of the data given below:

Count Coloured in Excel 1-1

Step 1: Go to cell F1002 where we can use the SUBTOTAL formula to capture the subtotal.

Count Coloured in Excel 1-2

Step 2: Start typing the formula for SUBTOTAL inside the cell F1002. This formula has several function options within it. You can see the list as soon as the formula is active.

Count Coloured in Excel 1-3

Step 3: Out of the list, you need to select the function number 102, which is associated with the COUNT function. Use the mouse to drag towards the function 102 and double click it to select.

Popular Course in this category
Excel Training (18 Courses, 9+ Projects) 18 Online Courses | 9 Hands-on Projects | 95+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.9 (2,671 ratings)
Course Price

View Course

Related Courses
Excel Data Analysis Training (12 Courses, 6+ Projects)Excel for Finance Training (15 Courses, 5+ Projects)

Count Coloured in Excel 1-4

Step 4: Use cells F1 to F10001 as a reference array within which the function COUNT will be used to count the cells. Fix the cell reference with the dollar sign as shown in the screenshot below.

Count Coloured in Excel 1-5

Step 5: Close the parentheses to complete the formula and press Enter key to see the output. You can see 1000 as a number in cell F1002.

Count Coloured in Excel 1-6

Step 6: Now apply filter to the entire data and use Filter by Cell Color option to filter the data with cell colors. As soon as you filter a specific color, the value of the cell F1002 will change to the number of cells that are with that specific color. See the screenshots below.

Filter by Cell Color

You can see there are 419 cells which have the same color as filtered i.e. light orange. You similarly can check the count of other colors as well.

Filter by Cell Color 1

This works fine because of the use of COUNT function (102) within the SUBTOTAL as an argument. COUNT function counts all the non-empty cells within the given range and subtotal gives the total of the counts. If we apply filter with any specific criteria, due to the nature of SUBTOTAL we only get the total count associated with that criteria (in this case color).

Example #2 – Using COUNTIF and GET.CELL

We can also use the COUNTIF and a GET.CELL function in combination to get the count of colored cells. GET.CELL is an old macro function which does not work with most of the functions. However, it has compatibility with named ranges. This function can extract the extra piece of information which a normal CELL function could not extract. We use this function to get information about the color of a cell. Follow the steps to know how we can count the cells with color using these two functions.

Step 1: Create a new named range ColorCode using the named ranges option within the Formulas tab.

Go to Formulas tab > inside Defined Names section, click on Define Name to be able to create a named range.

Define Name

Step 2: A pop-up box with “New Name” will appear. Mention the name as ColorCode and within Refers to: section, use the formula as =GET.CELL(38,’Example #2′!$A2). Press OK after the amendments. Your named range will be completed and ready to use.

Example #2 -2

38 here is an operation number associated with GET.CELL. It is associated with an operation that captures the unique color numbers in Excel.

Rename column G as ColorCode where we will capture the numeric codes associated with each color. These codes are unique for each color.

Step 3: In cell G2, start typing =ColorCode. This is the named range which we have just created in the previous step. Press Enter key to get a unique numeric code associated with the color of cell A2 (remember while defining the named range, we used A2 as a reference from sheet).

ColorCode Example #2

40 is the code associated with pink color in Excel.

ColorCode Example #2-1

Step 4: Drag and paste the formula across cell G3:G1001 and you’ll see different numbers which are nothing but the color codes associated with each color. See the partial screenshot below.

ColorCode Example #2-2

Step 5: Now we need to calculate what is the count of each color in the sheet. For this, we will use the COUNTIF function. Start typing =COUNTIF in cell B1003 of the given excel sheet.

COUNTIF -Count Colored

Please note that we have colored the cell 1003:1006 with the colors we have used respectively in our example.

Step 6: Use column G as a range argument to this function and ColorCode named range as a criterion. Complete the formula by closing the parentheses and see the output in cell B1003.

COUNTIF ColorCode

After using the formula output is shown below.

ColorCode Example #2-3

Drag and paste this formula across the remaining cells and see the count of remaining colors.

ColorCode Example #2-4

In this article, we have seen the different methods which can be used to find out the count of colored cells. Let’s wrap the things with some points to be remembered.

Things to Remember About Count Colored Cells In Excel

  • We don’t have any built-in function which can count the colored cells in the excel sheet. However, we can use a different combination of formulae to capture the same.
  • CELL function which we use in the second example gives more information related to a cell that general CELL function can’t provide.
  • Numeric code 102 we use under SUBTOTAL function is a numeric code of COUNT function under it.

Recommended Articles

This is a guide to Count Colored Cells in Excel. Here we discuss How to use Count Colored Cells in Excel along with practical examples and downloadable excel template. You can also go through our other suggested articles –

  1. Data Model in Excel
  2. Protect Sheet in Excel
  3. Count Cells with Text in Excel
  4. Excel Show Formula

All in One Excel VBA Bundle (120+ Courses, 30+ Projects)

120+ Online Courses

30+ Projects

500+ Hours

Verifiable Certificates

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Reader Interactions
Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar
Excel Functions Tutorials
  • Excel Tips
    • Excel Timesheet Template
    • Weighted Average in Excel
    • CTRL Shift-Enter in Excel
    • Excel Expense Tracker
    • INDEX MATCH Function in Excel
    • Shade Alternate Rows in Excel
    • Excel Database Template
    • Inverse Matrix in Excel
    • New Line in Excel Cell
    • Format Cells in Excel
    • Excel Text with Formula
    • Project Management Template in Excel
    • Vlookup vs Index Match
    • Embedded in Excel
    • Count Colored Cells in Excel
    • Excel Hacks
    • Column Header in Excel
    • Database Function in Excel
    • Excel Spell Check
    • Linear Interpolation in Excel
    • Convert Excel to CSV
    • Excel Not Responding
    • Delta Symbol in Excel
    • Excel Mortgage Calculator
    • Excel Show Formula
    • Break Links in Excel
    • VLOOKUP Examples in Excel
    • Alternate Row Color Excel
    • Checklist in Excel
    • Microsoft Office Tips
    • Excel vs Access
    • Excel Change Case
    • Count Characters in Excel
    • Formula Bar in Excel
    • Invoice Template in Excel
    • Find and Replace in Excel
    • PowerPivot in Excel
    • Wildcard in Excel
    • Line Break in Excel
    • NULL in Excel
    • Text Formula in Excel
    • Family Tree in Excel
    • Insert Calendar in Excel
    • Page Setup in Excel
    • Search For Text in Excel
    • Switching Columns in Excel
    • 3D Cell Reference in Excel
    • Roadmap Template in Excel
    • Cell References in Excel
    • Excel Automation
    • Matching Columns in Excel
    • Evaluate Formula in Excel
    • How to Find Mean in Excel
    • How to Add Cells in Excel
    • Project Timeline in Excel
    • TODAY Formula in Excel
    • Poisson Distribution in Excel
    • YEAR Formula in Excel
    • REPLACE Formula in Excel
    • Create Spreadsheet in Excel
    • SEARCH Formula in Excel
    • HYPERLINK Formula in Excel
    • Pivot Table with Multiple Sheets
    • COLUMNS Formula in Excel
    • DAY Formula in Excel
    • RIGHT Formula in Excel
    • INDIRECT Formula in Excel
    • Excel IRR Formula
    • Pivot Table Sort
    • OR Formula in Excel
    • Pivot Table Formula in Excel
    • How to Edit Drop Down List in Excel?
    • WEEKDAY Formula in Excel
    • Chart Wizard in Excel
    • Time Difference in Excel
    • Lookup Table in Excel
    • SUBTOTAL Formula in Excel
    • LOOKUP Formula in Excel
    • Themes in Excel
    • Group Worksheets in Excel
    • Excel ISNUMBER Formula
    • 3D Maps in Excel
    • VLOOKUP Tutorial in Excel
    • Moving Columns in Excel
    • Grouping Columns in Excel
    • Excel Formula of Percentage
    • Excel Leading Zeros
    • Timesheet in Excel
    • Nested IF Formula in Excel
    • SUMIF Formula in Excel
    • Concatenation in Excel
    • Excel Insert Page Break
    • LEN Formula in Excel
    • Insert Comment in Excel
    • Excel Print
    • Fractions in Excel
    • Excel Add a Column
    • Borders in Excel
    • Excel Sum by Color
    • Excel vs Google Sheets
    • Calculate Percentage Increase in Excel
    • Excel Format Phone Numbers
    • Excel Search Box
    • Excel vs CSV
    • Excel vs Numbers
    • Excel Concatenate Date
    • Excel Bullet Points
    • Calculate Compound Interest in Excel
    • Find External Links in Excel
    • Excel Comma Style
    • Excel Remove Leading Spaces
    • Combine First and Last Name in Excel
    • How to Calculate Ratio in Excel
    • SUMPRODUCT Function with Multiple Criteria
    • Create Excel Template
    • Excel Greater than or Equal
    • Excel Keyboard Shortcuts
    • Excel Row vs Excel Column
    • Excel Operators
    • Excel Text Compare
    • Excel Uppercase Function
    • Excel Auto Numbering
    • Watermark in Excel
    • Excel Delete Row Shortcut
    • Excel Word Count
    • Row Count in Excel
    • Excel Grade Formula
    • Excel Percentage Difference
    • Excel Rows and Columns
    • Excel Group
    • Excel Move Columns
    • Excel Row Height
    • Excel Sparklines
    • Excel Drawing a line
    • Multiple IFS in Excel
    • Excel Strikethrough
    • Numbering in Excel
    • Share Excel Workbook
    • Excel Shortcut For Merge Cells
    • Excel OneDrive
    • Excel Track changes
    • Excel Hide Formula
    • Excel Filter Shortcuts
    • Excel 3D Reference
    • Protect Excel Workbook
    • Excel Moving Averages
    • Excel Row Limit
    • Excel Absolute Value
    • Excel Print Area
    • Excel Format Painter
    • Excel Separate text
    • Excel Autofit
    • Excel Columns to Rows
    • Excel Paste Shortcut Option
    • Excel Rows to Columns
    • Excel Insert Row Shortcut
    • Excel Extensions
    • Excel Unmerge Cells
    • Divide in Excel Formula
    • Excel Compare Two Columns
    • Not Equal To Excel
    • Excel Remove Duplicates
    • Excel Remove Spaces
    • Excel Calculate Age
    • Copy Excel Sheet
    • Excel Conditional Formatting Based on Another Cell Value
    • Excel Cell Reference
    • Excel Split Cell
    • Excel Circular Reference
    • Highlight Every Other Row in Excel
    • Errors in Excel
    • Excel Delete Pivot Table
    • Excel Pivot Table
    • Subtraction in Excel
    • Count Unique Values in Excel
    • Excel Highlight Duplicates
    • Excel Data Formatting
    • Random Numbers in Excel
    • Basic Excel Formulas
    • Page Numbers in Excel
    • Excel CAGR Formula
    • Excel Combine cells
    • IFERROR with VLOOKUP in Excel
    • Column Sort in Excel
    • Print Comments in Excel
    • Cheat Sheet of Excel Formulas
    • Remove Hyperlinks in Excel
    • Excel Drop Down List
    • Remove (Delete) Blank Rows in Excel
    • Relative Reference in Excel
    • Subscript in Excel
    • Superscript in Excel
    • Excel Insert Multiple Rows
    • Excel Absolute Reference
    • Unhide Columns in Excel
  • Excel Functions (10+)
  • Excel Tools (97+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (12+)
  • Lookup Reference Functions in Excel (30+)
  • Maths Function in Excel (39+)
  • TEXT and String Functions in Excel (25+)
  • Date and Time Function in Excel (20+)
  • Statistical Functions in Excel (55+)
  • Information Functions in Excel (4+)
  • Excel Charts (44+)
  • VBA (180+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (14+)
  • Excel Formula and Functions (20+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL COURSE
  • Online Excel Data Analysis Course
  • Excel for Finance Course
Footer
About Us
  • Who is EDUCBA?
  • Sign Up
  •  
Free Courses
  • Free Online Excel Course
  • Free Vba Course
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training
Resources
  • Resources (A To Z)
  • Excel Charts
  • Excel Tips
  • Excel Tools in Excel
  • Excel Functions
  • Financial Functions in Excel
  • Logical Functions in Excel
  • Lookup Reference Functions in Excel
  • Maths Function in Excel
  • TEXT and String Functions in Excel
  • Date and Time Function in Excel
  • Statistical Functions in Excel
  • Information Functions in Excel
Apps
  • iPhone & iPad
  • Android
Support
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions

© 2019 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

Download Count Colored Cells Excel Template

By continuing above step, you agree to our Terms of Use and Privacy Policy.
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

Let’s Get Started
Please provide your Email ID
Email ID is incorrect

Limited Period Offer - All in One Excel VBA Bundle (120+ Courses, 500+ hours of Videos) View More

Limited Period Offer - Limited Period Offer - All in One Excel VBA Bundle (120+ Courses, 500+ hours of Videos) View More