Hi,
I have a big dataset and at the moment we run the following code on it to remove all rows where column "BS" contains the value "Blue":
This works but is incredibly slow as excel doesnt like removing rows in a big dataset, my solution would be to run the loop and instead of deleting the row to remember the row and do a single mass deletion at the end. Do you think this would work and if it would work how would I implement it?
Thanks a lot in advanced!
Bassie
I have a big dataset and at the moment we run the following code on it to remove all rows where column "BS" contains the value "Blue":
VBA Code:
For xx = Range(HeaderColor & Rows.Count).End(xlUp).Row To 1 Step -1 'Loop through range dynamically ("BS") at the moment
If Cells(xx, Color.Column).Value = "Blue" Then Cells(xx, Color.Column).EntireRow.Delete 'If cells in this column = "Blue" delete entire row
Next xx
This works but is incredibly slow as excel doesnt like removing rows in a big dataset, my solution would be to run the loop and instead of deleting the row to remember the row and do a single mass deletion at the end. Do you think this would work and if it would work how would I implement it?
Thanks a lot in advanced!
Bassie