First off, I'm pretty new to coding, and the use of vba and macros. I am trying to separate and format some test data. So I have written a lengthy macro to do this. Everything work great except keep getting an error in one section of code.
I am using the find function to search for the first failure to appear in a column (J), then i am trying to locate in what sequence of tests this failure occurred in. The sequence number can be found in the E column and spaced between 5 and 15 tests apart. (so there is no set offset from the failure to the sequence number). The first bit of code is not really important. Here is my code:

the error is occurring at "rng.Find...." line, its states "object required"

Any help would be greatly appreciated

Sub failure_sequence()


Dim lastrow As Long
Dim rng As Range
Dim fails As Range



lastrow = Range("B23").End(xlDown).Row

Set fails = Cells.Find("failed", ActiveCell, xlValues, xlPart, xlByRows, xlNext, False, False)
If fails Is Nothing Then
Sheets.Add.Name = "failuresequence"
Range("A1").Select
ActiveCell.FormulaR1C1 = "N/A"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:Q1"), Type:=xlFillDefault
Range("A1:Q1").Select
Else
Range("J23:J" & lastrow&).Find("failed").Select
Selection.Offset(0, -5).Select
Set rng = Range(Selection, Selection.Offset(-15, 0))
rng.Find("seq", ActiveCell, xlvaues, xlPart, xlByRows, xlPrevious, False, False).Select

Selection.EntireRow.Select
Selection.Copy
Sheets.Add.Name = "failuresequence"
Range("A1").Select
ActiveSheet.Paste
End If


End Sub