VBA Bold

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on January 10, 2022

You can use VBA in order to make text in cells bold. In this tutorial, you will learn how to make text bold.

Bold Text With VBA

You would set the Font.Bold Property of the Font Object to True in order to make text in a cell bold. The following code will make the text in cell A1 bold:

Range("A1").Font.Bold = True

The result is:

Making Text Bold in VBA

The above example used the Range Object in conjunction with the Font Object. You can also use the Cell Object in conjunction with the Font Object in order to refer to the cell of interest. The following code will make the text in Cell C2 bold:

Cells(2, 3).Font.Bold = True

Clearing Bold With VBA

You would set the Font.Bold Property of the Font Object to False in order to make bold text in a cell the normal font weight. The following code will make bold text in cell A1, the normal font weight:

Range("a1").Font.Bold = False

Remove All Formatting With VBA

You can also remove all formatting from a single cell or cells in your worksheet including the bold font weight, using the .ClearFormats method. The following code will remove all formatting from all the cells in a worksheet and as a result, bold text will be changed into the normal font weight:

Cells.Select
Selection.ClearFormats

 

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as


Learn More!
vba-free-addin

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples