Category Archives: Formatting Cells

Using the VBA Format Function

Short introduction to strings A string is a sequence or group of characters of any length that may or may not have a semantic meaning in language. It can consist of several characters like numbers, letters in both lowercase and uppercase, punctuation, and symbols. Examples

How to Use NumberFormat in VBA

Description FormatNumber is a property of the Range object of Excel. The Range object can be considered as a cell or a group of cells — be that a single cell, a column in an Excel table, or the UsedRange of an Excel sheet. The

No Thumbnail

Excel VBA, Font Strikethrough

In this article I will explain how you can use VBA to add strikethrough to the font of cells and ranges. I’ve also provided a sample code which checks if a cell has the strikethrough font or not. You can download the file and code

No Thumbnail

Excel VBA, Remove Fill Pattern

Jump To: Remove Fill Pattern From Cell Remove Fill Pattern From Range Remove Fill Pattern From Column Remove Fill Pattern From Row Remove All Fill Pattern From Sheet – Remove Fill Pattern From Cell: The following line of code removes the fill pattern from cell

No Thumbnail

Excel VBA, Fill Pattern

Various different patterns can be applied to cells in Excel. These patterns can be applied manually using the Format Cell dialog: This article will explain how you can apply different patterns to cells using VBA for Excel. Jump To: Basics Example 1, Set Pattern Example

No Thumbnail

Excel VBA, Column Gradient Color

In the article Excel VBA, Gradient’s Colors I’ve explained the basics about working with gradient’s color. I’m assuming the reader is familiar with the topics covered in that article. – Gradient Color, Column: In the article Excel VBA, Gradient’s Colors I provided 2 examples for creating gradients with different colors. The examples

No Thumbnail

Excel VBA Remove Sheet Fill Color

The following line of code removes any fill color applied to the cells in sheet 2: Sheet2.Cells.Interior.Color = xlNone Before: After: See also: Excel VBA, Cell Fill Color Excel VBA, Formatting Cells and Ranges using the Macro Recorder If you need assistance with your code, or you

No Thumbnail

Excel VBA Borders

One of the most common things you will be working with in Excel are borders. In this article I’ve have briefly explained the different customizations you can apply to borders using VBA for Excel. I’ve also provided links to more detailed explanations for each section. Jump