Excel like a finance pro.
VBA · Ranges
CurrentRegion
The block of data around a cell, bounded by blank rows and columns, like Ctrl + A once.
When to use it
CurrentRegion is the block of filled cells around a cell, bounded by empty rows and columns, exactly what Ctrl + A selects on the first press.
The code
- Code
Range("A1").CurrentRegion.Copy
Worked examples
Copy a table
Range("A1").CurrentRegion.Copy → Copies the whole table starting at A1
Without knowing its size.
A table variable
Set tbl = Range("A1").CurrentRegion lastRow = tbl.Rows.Count → The table as a variable
Then work with it.
Sort a table
Range("A1").CurrentRegion.Sort Key1:=Range("B1"), Header:=xlYes → Sort the block
Whole-table operations.
Worth knowing
- Stops at blank rows and columns, so a blank row splits the region.
- Faster to write than End(xlUp) when the data is contiguous.
- ListObject ranges are better for real Tables.
Where it goes wrong
- A stray value next to the table extends the region.
- A blank row inside the data cuts it short.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.