For Each d In rng
If InStr(d, "CISA Total") > 0 Then
d.Offset(0, 1).Copy
d.Worksheet.Paste Destination:=Worksheets("Top Errors").Range("B7")
End If
Next d
Looping cells in a range is the absolute slowest way to evaluate contents. Sometimes its the best way regardless, because its easy to implement and isnt prone to issues.
You could speed things up by using range.find instead, and if need be in a loop range.findnext. Basically find returns a range object, you set that to a variable and then do a range.value = range.value to transfer its value to another cell. Ironically I see now you use this in the next sub.
Depending on your data set you may also benefit from filter instead (either auto or advanced). You can filter on partial strings and then take the results and move them together (assuming you need more than 1 match for each term you seek).
Also, For loops are good for when you need to do something x number of times regardless of the result in each iteration. If you need to loop until something is found or while something is true/false, instead of using exit for to leave the loop, just use a Do while or Do until loop. This will allow the loop to only iterate as many times as required.
Changing references for ranges to be only the required range instead of full columns will help too, especially when using a for loop. In multiple places I see H:H instead of H2:H100 for example. If your looping every cell in H:H thats a million cells to check instead of 100, 1000, etc. Do this 20 times and its 20 millions cells to loop instead of 20,000. Also using constants can speed up code. Set a constant string for your range and then use the constant instead of quoted text strings manually entered multiple times. Use constants for text strings you repeat elsewhere in the code too.
copy/paste is slow and sometimes buggy. Instead do range.value = range.value. You can combine that with copy formatting or just code to format the destination.
Use variables for objects like sheets and workbook instead of repeatedly doing worksheets("")... do a worksheet object and assign it to a variable.
Turning off screenupdating will improve speed and so will turning off automatic calculation until your macros complete.
Overall, my guess is the biggest issue is the combination of whole column references combined with for loops checking each cell in those columns. Fix that and your code should run much faster.
Bookmarks