Using the Range Property

The Range property returns a cell or a range of cells. The reference to the range must be in an Al-style and in quotation marks (for example: "A1"). The reference can include the range operator, a colon, (for example "A1:B2") or the union operator, a comma, (for example "A", "B12").

To render this into VBA

Enter this in the Immediate window:

Select several non-adjacent cells (e.g., A1, B6, C8).

Select several non-adjacent cells and cell ranges (e.g., A11:D11, C12, D3).

Range("A5").Select Range("A6:A10").Select Range("A1, B6, C8").Select

Range("A11:D11, C12, D3").Select

0 0

Post a comment