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
Click on Insert, and then Module
This will create new module.

Enter the following code in the Module

Function FindBold(BoldRange As Range)

FindBold = BoldRange.Font.Bold

End Function
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)
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 *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>