[color blue]Sub[/color] FindUsedRange()
[color blue]Dim[/color] LastRow [color blue]As Long
Dim[/color] FirstRow [color blue]As Long
Dim[/color] LastCol [color blue]As Integer
Dim[/color] FirstCol [color blue]As Integer[/color]
[color green]' Find the FIRST real row[/color]
FirstRow = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlNext, _
SearchOrder:=xlByRows).Row
[color green]' Find the FIRST real column[/color]
FirstCol = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlNext, _
SearchOrder:=xlByColumns).Column
[color green]' Find the LAST real row[/color]
LastRow = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
[color green]' Find the LAST real column[/color]
LastCol = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByColumns).Column
[color green]'Select the ACTUAL Used Range as identified by the
'variables identified above[/color]
ActiveSheet.Range(Cells(FirstRow, FirstCol), _
Cells(LastRow, LastCol)).Select
[color blue]End Sub[/color]