Name

range.Characters([Start], [Length])

Synopsis

Returns a Characters object representing all the characters in a text cell or a specified string within the text.

Argument

Settings

Start

The position of the first character in the string. The default is the first character.

Length

The number of characters in the string. The default is the remaining characters in the cell.

The following code changes the font to bold type for the first six characters in cell A9. For example, if the first word in the cell is “urgent,” the following code displays only that word in bold type:

ActiveSheet.Range("A9").Characters(1, 6).Font.Bold = True

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.