How do i find the last cell range in a sheet

C

Crash

Sub Last()

MsgBox "Last cell is " & _
ActiveSheet.UsedRange.SpecialCells(xlLastCell).Address
End Sub

Jon
 
P

Phil Hunt

That was quick. I may have more question later. This is my first time
programming Excel
 
T

Tom Ogilvy

set rng = Cells.SpecialCells(xlCellTypeLastCell)

finds the lower right corner of the usedrange. It may not be what you
expect however.
 
Top