Disclosure: This post may contain affiliate links, meaning when you click the links and make a purchase, we receive a commission.

How to Use COUNTIF Function In Excel to Count Bold Cells

In this tutorial, I am going to share with you step-by-step methods on how to use the COUNTIF function to count bold cells in excel. You can easily apply these steps in any set of data to count the existing bold cells. To achieve this task, we will also see some useful functions that might come in handy in many other excel related tasks. Also, in the last section, I will show you how we can count colored cells in excel.


Download Practice Workbook

You can download the practice workbook from here.


Step-by-Step Procedures to Use COUNTIF Function to Count Bold Cells in Excel

We have taken a concise dataset to explain the steps clearly. The dataset has approximately 7 rows and 2 columns. Initially, we are keeping all the cells in General format and the monetary values in Accounting format. For all the datasets, we have 2 unique columns which are Item and Price. Although we may vary the number of columns later on if that is needed.

excel countif bold


Step 1: Opening Find & Select Option

In the following section, we will see how to open the Find & Select option to count bold cells in excel using the COUNTIF function. Follow the steps below to achieve this.

  • First, go to the Home tab and click on Find & Select under Editing.
  • Here, click on Replace.

find & select option to count if cells contain bold formatting in excel


Step 2: Inserting Data

Now, we need to insert the data format that we count inside the Find and Replace window. Let us see how we can do this.

  • Now, click on the Format drop-down beside the Find what option and select Choose Format From Cell.

find & select option to count if cells contain bold formatting in excel

  • Then, click on any of the bold cells that you want to count.

find & select option to count if cells contain bold formatting in excel

  • As a result, you will see a Preview of what to find and type bold in the Replace with option below.
  • Now, click on Replace All.

Read More: Excel COUNTIF Function with Conditional Formatting (7 Examples)


Step 3: Applying the COUNTIF Function

In this final step, we will use the COUNTIF function to count the cells that have the word bold in them.

  • After you completed the previous step, this will replace the bold cells with the text bold.
  • Now, go cell C11 and type in the following formula:
=COUNTIF(C5:C10,"bold")

  • Finally, this will count the number of bold cells in the dataset.

Read More: Excel COUNTIF to Count Cell That Contains Text from Another Cell


Similar Readings


How to Count Bold Cells Using VBA in Excel

If you are familiar with VBA in excel, then you can easily count if the cells contain bold formatting just by writing a few lines of code. Let us see how we can do that.

Steps:

  • For this method, go to the Developer tab and select Visual Basic.

vba code to count if cells contain bold formatting in excel

  • Now, select Insert in the VBA window and click on Module.

vba code to count if cells contain bold formatting in excel

  • Next, type in the formula below in the new window:
Function CountIfBold(SelectRange As Range)
Dim CurrentRange As Range
Dim BoldCount As Double
For Each CurrentRange In SelectRange
    If CurrentRange.Font.Bold Then
        BoldCount = BoldCount + 1
    End If
Next
CountIfBold = BoldCount
End Function

  • Then, go to cell C11 and insert this formula:
=CountIfBold(C5:C10)

  • Now, press the Enter key and this will calculate the number of bold cells inside cell C11.

Read More: How to Use COUNTIF for Non Contiguous Range in Excel


How to Count Coloured Cells in Excel

We can use the COUNTIF function in excel to also count colored cells just as we did to count bold cells. Below are the detailed steps to do this.

Steps:

  • To begin with, navigate to the Home tab and click on Find & Select under Editing.
  • Next, click on Replace.

  • Now, in the Find and Replace window, click on Options.

  • After that, click on the Format drop-down beside the Find what field and select Choose Format From Cell.

  • Here, click on any of the cells with the fill color that you want to count.

  • Consequently, you will see a preview in the window and type the word colored inside Replace with.
  • Now, click on Replace All.

  • As a result, this will insert the word colored in all the cells with fill color and here type this formula in cell C11:
=COUNTIF(C5:C10,"colored")

  • Finally, press Enter to get the number of cells with fill color.


Conclusion

I hope that you were able to apply the methods that I showed in this tutorial on how to count if cells contain bold formatting in excel. As you can see, there are quite a few ways to achieve this. So wisely choose the method that suits your situation best. If you get stuck in any of the steps, I recommend going through them a few times to clear up any confusion. Lastly, to learn more excel techniques, follow our ExcelDemy website. If you have any queries, please let me know in the comments.


Related Articles

Nazmul Hossain Shovon

Nazmul Hossain Shovon

Hello, I am Nazmul Hossain. I am currently working full-time in Exceldemy as an Excel & VBA Content Developer. I have completed my bachelors in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology. I am interested in working with MS Excel. I also like coding web applications a lot.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo