F&s anaylst
Active Member
- Joined
- Oct 9, 2008
- Messages
- 277
Hi There,
i have the below code that loop through a list and hides rows that doesn't contain a value of the Textbox, it works fine but becomes very show where number of records it passed through the loop is greater than 1000, is there more efficient way of writing this code?
Number of cells to loop through is 10000 Max
i have the below code that loop through a list and hides rows that doesn't contain a value of the Textbox, it works fine but becomes very show where number of records it passed through the loop is greater than 1000, is there more efficient way of writing this code?
Number of cells to loop through is 10000 Max
PHP:
Private Sub tboxSearch_Change()
LastRow = Cells(rows.count,5).end(xlup).row
For Each cell In Range(Cells(55, 5), Cells(LastRow,5))
If InStr(UCase(cell.Value), UCase(tboxSearch.Value)) = 0 Then
Rows(cell.Row).EntireRow.Hidden = True
End If
Next cell
End Sub