Skip to main content

How to sum / count bold numbers in a range of cells in Excel?

Author: Xiaoyang Last Modified: 2024-12-02

If you have a range of data containing bold numbers in a worksheet and want to sum or count only the bold cells, you could add them manually, but it would be time-consuming. How can you quickly and easily sum or count only the bold cells in Excel?

Count bold numbers in a range with User Defined Function (VBA and formula)
Sum bold numbers in a range with User Defined Function (VBA and formula)
Several click to count and sum bold cells in a range with Kutools for Excel


Count bold numbers in a range with User Defined Function

The following User Defined Function can help you quickly get the number of bold cells. Please do as this:

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code:Count bold numbers in a range of cells

Function CountBold(WorkRng As Range)
'Update 20220516
Dim Rng As Range
Dim xCount As Double
For Each Rng In WorkRng
    If Rng.Font.Bold Then
        xCount = xCount + 1
    End If
Next
CountBold = xCount
End Function

3. Then save this code, and type this formula =CountBold(A1:C9) into a blank cell, see screenshot:

A screenshot of the User Defined Function being used to count bold cells in a specified range in Excel

4. Then press Enter key, and you will count the bold cells in the range A1:C9.

A screenshot showing the result of counting bold cells in Excel

Note: A1:C9 in the formula indicates the range you want to use the function to count the bold cells, you can change it as your need.


Sum bold numbers in a range with User Defined Function

If you want to sum only the bold numbers in a data range, you can create a user-defined function to achieve this.

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code:Sum bold numbers in a range of cells

Function SumBold(WorkRng As Range)
'Update 20220516
Dim Rng As Range
Dim xSum As Double
For Each Rng In WorkRng
    If Rng.Font.Bold Then
        xSum = xSum + Rng.Value
    End If
Next
SumBold = xSum
End Function

3. Then save this code, and type this formula =sumbold(A1:C9) into a blank cell, see screenshot:

A screenshot of a formula to sum bold numbers in a specified range in Excel

4. And then press Enter key, all the bold numbers in the range A1:C9 have been added up. See screenshot:

A screenshot showing the result of summing bold numbers in Excel

Note: A1:C9 in the formula indicates the range you want to use the function to sum the bold cells, you can change it as your need.


Several click to count and sum bold cells in a range with Kutools for Excel

You can easily count or sum all bold cells in a range with several clicks without handling complicated VBA code and remembering formulas.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Enhanced with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. For counting bold cells, please select a blank cell for locating the result, and then click Kutools > Kutools Functions > Statistical & Math > COUNTBYFONTBOLD.

And for summing bold cells, click Kutools > Kutools Functions > Statistical & Math > SUMBYFONTBOLD. See screenshot:

A screenshot of Kutools functions COUNTBYFONTBOLD and SUMBYFONTBOLD in Excel

2. In the Function Arguments dialog box, specify the range with bold cells you need to count or sum in the Reference box, and then click the OK button.

A screenshot of the Function Arguments dialog box

The count or sum of all bold cells in the specified range is now displayed in the selected cell. See screenshot:

A screenshot showing the result of counting or summing bold cells using Kutools

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Demo: Count and sum bold cells in a range with Kutools for Excel

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Related articles:

How to identify and select all bold cells or text in Excel?

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

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!