Using the Current Region Property to Quickly Select a Data Range

CurrentRegion returns a range object representing a set of contiguous data. As long as the data is surrounded by one empty row and one empty column, you can select the table with CurrentRegion: RangeObject.CurrentRegion

Look at Figure 3.7. The following line would select A1:D3, as this is the contiguous range of cells around cell A1:

Range("A1").CurrentRegion.Select

This is useful if you have a table whose size is in constant flux.

Figure 3.7

CurrentRegion to quickly select a range of contiguous data around the active cell.

Look at Figure 3.7. The following line would select A1:D3, as this is the contiguous range of cells around cell A1:

Range("A1").CurrentRegion.Select

This is useful if you have a table whose size is in constant flux.

Figure 3.7

CurrentRegion to quickly select a range of contiguous data around the active cell.

0 0

Post a comment