Excel like a finance pro.
← The libraryPractice · 2 questions →
VBA · Ranges
Range
Refers to a cell or block by address, name, or as an intersection.
Daily driverDifficulty 950 · Capable
When to use it
Range refers to a cell or block by address text, a defined name, or two corner cells. It is the workhorse object of nearly every macro.
The code
- Code
Range("A1:C10") Range("Total") Range("A1", "C10")
Worked examples
By address
Range("A1:C10") → A block by address
The everyday form.
By name
Range("Total") → A named range
Names survive layout changes.
By corners
Range("A1", "C10") Range(Cells(1, 1), Cells(10, 3)) → Two corners, useful with computed rows
Build from variables.
Worth knowing
- Qualify with a sheet: ws.Range("A1").
- Range("A1:A10").Value returns a 2D array; a single cell returns a value.
- Range("A:A") is a whole column; combine with End(xlUp) for the used part.
Where it goes wrong
- Unqualified Range hits the active sheet.
- Range("A1:C10").Value = 5 fills every cell, which may be more than intended.
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.