hi there , is there any try end try statement .. ?? it gives me an error when using end try ...
another thing is how do i go back to the last active worksheet ??
the method below compares with 2 words and selects everything in between , then how do i select the last few rows with nothing to compare to ?
Sub test2()
Dim r1 As Range, r2 As Range, rSelect As Range
Dim x As Long, y As Long
With ActiveSheet.UsedRange
Set r1 = .Find("on", LookIn:=xlValues)
If Not r1 Is Nothing Then
x = r1.Row
End If
Set r2 = .Find("off", LookIn:=xlValues)
If Not r2 Is Nothing Then
y = r2.Row
End If
Set rSelect = Range("a" & x, Range("a" & y))
rSelect.EntireRow.Select
End With
End Sub