How to Find Bold Cell using VBA in Microsoft Excel 2010

In this article, you will learn how to find bold cell using VBA. We will use VBA code to create UDF function to find out the bold cells.
 
Click on Developer tab

From Code group, select Visual Basic
 
img1
 
Click on Insert, and then Module
 
img2
 
This will create new module.

Enter the following code in the Module

Function FindBold(BoldRange As Range)

FindBold = BoldRange.Font.Bold

End Function
 
img3
 
The new UDF formula is created with name FindBold

The only parameter is to give reference of cell & function will return TRUE (if font is bold) or FALSE (if font is not bold). Refer below snapshot

Cell B2 =FindBold(A1)
 
img4
 
In this way, we can use this piece of coding in big projects while doing automation.
 
 

Leave a Reply

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

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.