Columns Method [WksRange]

The Columns method returns a range containing all or some of the columns of the current range. Returns a WksRange object.

Syntax

object.Columns( Col1, Col2 )

 

Parameter Type Description
Col1 Variant required, see remarks. The range may have a single column.
Col2 Variant optional, see remarks

 

Remarks

See Specifying Cell Coordinates for more information on selecting cells.

Example

This example demonstrates how to set the cell color to chalk in columns 2 and 3 of a range.

WksRange.Columns(2, 3).Format.BackColor = grfColorChalk

 

Used by: WksRange object