Excel - Cell

Card Puncher Data Processing

Excel - Cell

About

In Microsoft Excel, you usually select a cell (see active cell) or cells and then perform an action, such as formatting the cells or entering values in them. In Visual Basic, it is usually not necessary to select cells before modifying them.

Get

Range

See range

Cells

Use Cells(row, column) where row is the row index and column is the column index, to return a single cell.

'Cell A1
Worksheets(1).Cells(1, 1).Value = 24

'Cell A2
ActiveSheet.Cells(2, 1).Formula = "=Sum(B1:B5)"





Discover More
Card Puncher Data Processing
Excel - Cell Addressing (Address and Indexing)

Although you could use Visual Basic string functions to alter A1-style references, it's much easier (and much better programming practice) to use the (1, 1) notation.



Share this page:
Follow us:
Task Runner