CurrentRegion
It will look around a respective cell and then it will return the range of the cell up to where it will find no blank rows or columns.
Trapping Dynamic Ranges in Excel VBA
Dynamic Ranges give the flexibility to work with more range of cells as compared to a specific range of cells which usually limits us to work with a particular range of cells. As the size of the data may change in an excel sheet so it is also necessary to change the range in the code dynamically for that dynamic ranges are used. We can trap dynamic ranges in different ways:
- Last Row in Column
- Last Column in Row
- Special cells
- Used Range
- Current Region
- Named Region
- Tables