Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

When you have a data range which contains some bold numbers in a worksheet, and now you want to sum or count only the bold cells, of course you can add them up one by one manually, but it will be time-consuming. How could you sum or count only the bold cells in Excel with an easy and quick way?

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


Quickly select all bold cells in a range in Excel:

With the Kutools for Excel's Select Cells with Format utility, you can select all cells with same formatting or color in a range at once.

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download the free trial Now!

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

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 20131202
Dim Rng As Range
Dim xCount As Long
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:

doc-count-bold-cells1

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

doc-count-bold-cells2

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

And if you want to sum only the bold numbers in a data range, I can also create a user defined function for you to solve it.

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 20131202
Dim Rng As Range
Dim xSum As Long
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:

doc-count-bold-cells3

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

doc-count-bold-cells4

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 : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

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:

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.

Now the counting or summing of all bold cells in specified range are populated in selected cell immediately. See screenshot:

Tip.If you want to have a free trial of this utility, please go to download the software freely first, and then go to apply the operation according above steps.


Keep formula cell reference constant with Kutools for Excel

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 60 days. Download the free trial now!


Related articles:

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


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Djn · 1 years ago
    А если в ячейках числа и текст? надо просуммировать только ячейки с числами жирным шрифтом.
  • To post as a guest, your comment is unpublished.
    Kal · 3 years ago
    RE: CountBold formula
    This formula does not appear to be dynamic. While it works at first pass, if i change the bolded cells the counters do not update unless i re-enter the formula again. Any tips?
    • To post as a guest, your comment is unpublished.
      Daniel · 3 years ago
      Yea this is the same for me, otherwise it works great. But if this could be solved so it refreshes the count after each cell deselect like other basic counts it would be perfect!
      • To post as a guest, your comment is unpublished.
        crystal · 2 years ago
        Dear guys,
        The formula won't update if you just change the format of the number cells.
        It updates only when you change the cell content.
  • To post as a guest, your comment is unpublished.
    Julia · 5 years ago
    I'm using excel for mac 2011. How can I run the code on my system? thanks!
  • To post as a guest, your comment is unpublished.
    Maey · 5 years ago
    I copied and pasted code into excel but get #NAME? error. I made sure to enable macros and using excel 2010 version (don't know if that changes anything). Can anyone please help?!
    • To post as a guest, your comment is unpublished.
      Vadim · 5 years ago
      [quote name="Maey"]I copied and pasted code into excel but get #NAME? error. I made sure to enable macros and using excel 2010 version (don't know if that changes anything). Can anyone please help?![/quote]

      You have to follow the instruction. It says: "Click Insert > Module, and paste the following code in the Module Window", and you have to do exactly so. Make sure you paste the code in the Module Window, not in the Sheet code Window.
  • To post as a guest, your comment is unpublished.
    Anil · 5 years ago
    Thank you..

    it's working...
  • To post as a guest, your comment is unpublished.
    Katie · 5 years ago
    This works a treat. I only have one issue...it doesn't seem to be adding anything after a decimal point. Any help would be greatly appreciated.
  • To post as a guest, your comment is unpublished.
    Katie · 5 years ago
    This works perfectly except it doesn't seem to add my decimal places, only adds the whole dollar.
    If you have a fix for this I would be very grateful.
    • To post as a guest, your comment is unpublished.
      Taz · 5 years ago
      Hi Katie, Use the below code, as the sum shows decimal places.

      Function SumBold(rng As Range)
      Dim rCell As Range
      Application.Volatile
      SumBold = 0
      For Each rCell In rng
      If rCell.Font.Bold Then _
      SumBold = SumBold + rCell
      Next
      End Function
  • To post as a guest, your comment is unpublished.
    Peter · 5 years ago
    THIS IS AWESOME !!!! It worked perfectly !! Thank you
  • To post as a guest, your comment is unpublished.
    kersten · 5 years ago
    hello,
    using excel 2013 Dutch with kutools 6.5 but can't sill using reading layout.
    ask before shout be solved in this version ???
    • To post as a guest, your comment is unpublished.
      Admin-jay · 5 years ago
      [quote name="kersten"]hello,
      using excel 2013 Dutch with kutools 6.5 but can't sill using reading layout.
      ask before shout be solved in this version ???[/quote]

      Hello, Please contact me at jaychivo#extendoffice.com. Please replace # with @.

      :-)
      • To post as a guest, your comment is unpublished.
        Trenton · 5 years ago
        Is there a way to count based on cell color if text is bolded?