Page 166 - Excel Progamming Weekend Crash Course
P. 166
k540629 ch11.qxd 9/2/03 9:34 AM Page 141
SESSION
11
Working with Columns,
Rows, and Cells
Session Checklist
✔ Use the Cells property to reference single cells in a range
✔ Use the SpecialCells property to access selected cells based
on their content
✔ Access and manipulate entire rows and columns in a worksheet
✔ Add and delete worksheet rows and columns
he previous session showed you how to use the Range object to identify and manipulate
specific parts of a worksheet. Sometimes your program needs to work with columns,
T rows, and individual cells. This session shows you how to perform these tasks.
Referencing Cells with the Cells Property
When you need to work with worksheet cells, the Cells property of the Range and
Worksheet objects is one of the most useful tools available to you. The Cells property
enables you to access single cells within a range in a manner that is convenient in program-
ming. The Cells property works in a similar manner for the Worksheet and Range objects,
but with this difference:
The Range.Cells property references just the cells in that range.
The Worksheet.Cells property references all the cells in the worksheet (not just
the used cells).
There are three ways to use the Cells property, explained in the following sections.