Worksheet.Columns property (Excel)

Returns a Range object that represents all the columns on the specified worksheet.

Syntax

expression.Columns

expression A variable that represents a Worksheet object.

Remarks

Using the Columns property without an object qualifier is equivalent to using ActiveSheet.Columns. If the active document isn't a worksheet, the Columns property fails.

To return a single column, include an index in parentheses. For example, Columns(1) and Columns("A") return the first column.

Example

This example formats the font of column one (column A) on Sheet1 as bold.

Worksheets("Sheet1").Columns(1).Font.Bold = True

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.