I have a very long spreadsheet. Each line represents a customer location. I would like a list of customers (one line for every customer). Normally I would use a pivot table, but I have to many unique entries for a pivot table to work. So what I did was create a column next to the customer name and use COUNTIF. Than I wrote a little command button.
I thought that I was doing ok, until I realized that this would take a year to run. Each time a row is deleted, excel recalculates the entire column of COUNTIFs.
How do I make this faster?
Note: I had a computer glitch (lost the connection with server after pressing submit), hopefully this will not post twice. If it does please summarily delete the extra. However, it looks like the first did not go through.
Code:
For Each Cell In Selection
If Cell.Value > 1 Then
Cell.EntireRow.Delete
End If
Next Cell
I thought that I was doing ok, until I realized that this would take a year to run. Each time a row is deleted, excel recalculates the entire column of COUNTIFs.
How do I make this faster?
Note: I had a computer glitch (lost the connection with server after pressing submit), hopefully this will not post twice. If it does please summarily delete the extra. However, it looks like the first did not go through.