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.
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.