spencerp237
New Member
- Joined
- Feb 24, 2017
- Messages
- 26
Code:
Dim lastRow As Integer
lastRow = Sheets("CustomReport").Cells(Rows.count, 1).End(xlUp).Row
For i = 1 To lastRow
If WorksheetFunction.IsErr(WorksheetFunction.Find(Sheets("CustomReport").Cells(i, 15), Sheets("Sheet8").Range("A2:A" & Sheets("Sheet8").Cells(Rows.count, 1).End(xlUp).Row))) = False Then
Sheets("CustomReport").Cells(i, 15).EntireRow.Delete
End If
Next i
I am trying to have this macro loop through a data export. It looks in column "O" (15) on the "CustomReport" sheet and checks if it is in the specified range on "Sheet8".
When I run this, I get a "Run-time error'13': Type mismatch" error message.