KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to Count Cells Equal to A, B, or C in Excel

AuthorSiluviaLast modified

When working with Excel, you may often need to count how many cells contain specific values such as A, B, or C within a range. This is a common requirement in scenarios like grading systems, survey results, or category-based data analysis.

However, Excel does not provide a direct built-in function to count multiple specific values in a single step. You typically need to combine formulas or use more advanced techniques. In this article, we will walk you through three practical methods to count cells equal to A, B, or C: using Excel formulas, VBA, and a much simpler approach with Kutools for Excel.

count cells equal to a b or c


Count Cells Equal to A, B, or C Using Excel Formulas

Excel formulas provide a flexible way to count cells that match multiple values such as A, B, or C. Although there is no single built-in function for counting multiple specific values at once, you can easily achieve this using the COUNTIF function.

For example, in the worksheet below, the Grade column contains values such as A, B, C, and D. If you want to count how many cells are equal to A, B, or C, you can use the following formulas.

show the column data where you want to count cells

A common and straightforward approach is to use multiple COUNTIF functions and add the results together.

Steps:

  1. Select a blank cell where you want the result to appear.
  2. Enter the following formula:
    =COUNTIF(A1:A10,"A") + COUNTIF(A1:A10,"B") + COUNTIF(A1:A10,"C")
  3. Press Enter.

Result:

This formula counts each value (A, B, and C) separately and then sums the results to get the total count.

how to use the formula

While this method is easy to understand and works in all Excel versions, the formula can become longer when you need to include more values.

To make the formula shorter and more efficient, you can also use an array constant within COUNTIF:

=SUM(COUNTIF(A2:A100,{"A","B","C"}))
how to use the second formula
Notes:
  • In this formula, the array {"A","B","C"} allows COUNTIF to evaluate multiple values at once, and the SUM function combines the results into a single total.
  • You can easily modify the values (A, B, C) as needed.

Count Cells Equal to A, B, or C Instantly with Kutools for Excel

If you prefer not to work with formulas or want a faster solution, Kutools for Excel provides a built-in tool that simplifies this task significantly.

Kutools includes a Formula Helper that allows you to count cells equal to A, B, or C without writing any formulas manually.

Kutools for Excel - Packed with over 300 essential tools for Excel. Make Excel tasks faster, easier, and more efficient. Download now!

Steps:

  1. Select a cell to output the result, click Kutools > Formula Helper > Statistical > Count cells equal to A, B or C.
    enable the count cells equal to a b or c feature
  2. In the Formular Helper dialog box, configure the formula arguments:
    1. In the Range field, select the data range where you want to count cells.
    2. 2) Enter the values you want to count (such as A, B, and C) into the three criteria fields.
    3. Click OK.
      configure the count cells equal to a b or c feature

Result:

The result is returned instantly without needing to remember or type any formulas.

the result

Kutools for Excel - Supercharge Excel with over 300 essential tools, making your work faster and easier, and take advantage of AI features for smarter data processing and productivity. Get It Now

Why use Kutools:

  • No need to memorize formulas.
  • Easy-to-use interface.
  • Supports multiple criteria input.
  • Ideal for beginners and frequent users.

This method is especially useful when working with complex datasets or when you need a quick and reliable solution.


Count Cells Equal to A, B, or C Using VBA

For users who prefer automation or need a reusable solution, VBA can be used to create a custom function to count multiple values.

Steps to Use the VBA Function:

  1. Press Alt + F11 to open the VBA editor.
  2. Click Insert > Module.
  3. Paste the code into the module window.
    euse the VBA code
    VBA code: Count cells equal to A B or C
    Function CountMultipleValues(rng As Range, ParamArray values() As Variant) As Long
        Dim cell As Range
        Dim i As Long
        
        For Each cell In rng
            For i = LBound(values) To UBound(values)
                If cell.Value = values(i) Then
                    CountMultipleValues = CountMultipleValues + 1
                    Exit For
                End If
            Next i
        Next cell
    End Function
  4. Return to Excel and apply the following function.
    =CountMultipleValues(C2:C21,"A","B","C")
  5. Press Enter to get the result.
    apply function to get the result
Note: To retain the code for future use, save the workbook as an Excel Macro-Enabled Workbook (.xlsm file).

Conclusion

Counting cells equal to A, B, or C in Excel can be achieved in several ways, depending on your needs and experience level.

  • The Excel formula methods are reliable and widely supported, but may become complex with multiple criteria
  • The VBA method offers flexibility and customization, but requires technical knowledge
  • Kutools for Excel provides the easiest and fastest solution, allowing you to complete the task without writing any formulas

If you frequently work with multi-condition counting tasks, using Kutools can greatly simplify your workflow and improve efficiency.


Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in