I tried that, the only problem is that number of rows will sometimes change.
The end result needs to be a .csv or .txt file so it can be uploaded into another application. So this function currently sits in the middle of a macro that sorts, tries to delete rows with zero values, and then formats the file into a .csv file.
Everything else works except the deletion of zero value rows.
This stops Excel updating what appears on the screen until it is set back to True at the end of the process. This has two advantages:
1. If it were not done, you would see a lot of flickering (particularly if you have a lot of rows in your sheet that need deletion) as the code runs.
2. The code runs faster if it does not have to stop and update the screeb display after every change.
To see what happens, temporarily 'Comment Out' that line of code by preceding it with a ' (or change the False to True).