Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.17 KB

Excel.Worksheet.Columns.md

File metadata and controls

43 lines (25 loc) · 1.17 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Worksheet.Columns property (Excel)
vbaxl10.chm175086
vbaxl10.chm175086
Excel.Worksheet.Columns
41c18561-2a87-b975-e212-97f39fe10393
05/30/2019
medium

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, use the Item property or equivalently include an index in parentheses. For example, Columns(1), Columns("A"), Columns.Item(1) and Columns.Item("A") return the first column of the active sheet.

Example

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

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

[!includeSupport and feedback]