I currently use a lot of loops in my macros. Someone recently introduced me to arrays and they seem to be much faster at running through the data. However, when an action needs to be taken, it has to access the sheet again and this seems to be just as slow. Is there a way to run through the array and save all the necessary changes? Then execute all the changes in one step at the end? Here is the code.
Sub Test()
rowsend = Range("A" & Rows.Count).End(xlUp).Row
varsheet = Range(Cells(1, 1), Cells(rowsend, 1))
For i = 1 To rowsend
If varsheet(i, 1) = "I'm Awesome" Then
Cells(i, 1).Interior.Color = 1234545
End If
Next
End Sub
Bookmarks