Category Archives: Sample Codes and Downloads

No Thumbnail

Excel VBA, Underline Font Style

This article explains the different types of underlines possible to apply to cells and ranges. It also provides the associated VBA code for adding the underline. For examples using these codes please see: Excel VBA Set Underline (Sample Code + Download) Excel VBA Get Underline

No Thumbnail

Excel VBA, Merge Cells

In this article I will explain how you can use VBA to merge cells in Excel. I have also provided two sample codes. Jump To: Basics, MergeCells Example 1, Merge Rows Example 2, Merge Columns You can download the code and file related to this

No Thumbnail

Excel VBA, Font Subscript

In this article I will explain how you can use VBA to change the font style in a cell or range to subscript. I’ve also provided a sample code which checks if the font in a cell is subscript or not. You can download the file and code

No Thumbnail

Excel VBA, Set Vertical Alignment (Sample Code)

In this article I will provide an example on how to set the vertical alignment of cells using VBA. The user selects the vertical alignment from a set of drop down lists. The selected vertical  alignment will be applied to the cell below the drop down list. You can download the file and code related to this article here. Upon

No Thumbnail

Excel VBA Get Underline (Sample Code + Download)

In this article I’ve provided an example on how you can get the current underline style used in a cell. When the user presses the Run button the program loops through the cells in row 1. In row 2 the type of underline used is printed. There

No Thumbnail

Excel VBA, Font Color

In this article I will explain how you can change the font color of cells and ranges in Excel using VBA. I’ve also provided an example on how you can get the current font color used in a cell. For more information about working with

No Thumbnail

Excel VBA, Color Code

This article provides a sample on using the color code in VBA for Excel. In this example the user inputs a color code in cell B1. The fill color in cell A1 is changed to the color defined by the color code in cell B1.

No Thumbnail

Excel VBA, Font Size

In this article I will explain how you can change the size of the font for a cell or range in Excel using VBA. I’ve also provided an example on how you can retrieve the size of the font used in a cell or range.

No Thumbnail

Excel VBA, Font Superscript

In this article I will explain how you can use VBA to change the font style in a cell or range to superscript. I’ve also provided a sample code which checks if the font in a cell is superscript or not. You can download the file and code