Does anyone have any suggestions on how to speed this up? I need it to be as fast as possible.
Sub Find()
Dim i As Long
Dim x As Long
Dim SS As Object
Set SS = frmSearch.Spreadsheet1.Sheets("Data")
Dim SearchData As String
Dim NoSD As Long
NoSD = SS.Range("A65536").End(xlUp).Row
Dim FinalRow As Long
FinalRow = Range("A65536").End(xlUp).Row
For i = FinalRow To 2 Step -1
DoEvents
For x = 1 To NoSD
DoEvents
SearchData = SS.Range("A" & x).Value
If Range("C" & i).Value = SearchData Then
If frmOptions.chkBold = True Then 'Bold
Rows(i).Font.Bold = True
End If
If frmOptions.chkDeBoldText = True Then
Rows(i).Font.Bold = False
End If
If frmOptions.chkClear = True Then 'ClearContents
Rows(i).ClearContents
End If
If frmOptions.chkDelete = True Then 'Delete
Rows(i).Delete
End If
If frmOptions.chkHighlight = True Then 'Highlight
Rows(i).Interior.Color = vbYellow
End If
If frmOptions.chkNoFill = True Then
Rows(i).Interior.Color = xlNone
End If
End If
Next x
Application.StatusBar = "Working with line # " & i & " w/ criteria " & x
Next i
Application.StatusBar = False
End Sub
Bookmarks