View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.programming
cardan cardan is offline
external usenet poster
 
Posts: 112
Default Macro to Convert Value to Number, Sort, then Delete

On Mar 9, 10:06*am, "Rick Rothstein"
wrote:
I can't seem to get the macro to work. I am using the
combined macro provided by Wouter. It appears the
error is in the "ActiveCell.Offset(1,0).Select" line. At
least that is what is highlighted when I do debug. Any
thoughts on what I could be missing or doing wrong?


Since you are using Wouter's code, I would think you should be directing
your question to him, not me, given that he would be more familiar with the
ins-and-outs of the code he wrote. However, in looking quickly at the code
he posted, the problem may lie with the line above the one you identified,
namely, this one...

While ActiveCell.Text < "Delete"

I would note that your original post said you had "DELETE" (all upper case)
in your cells whereas Wouter's code is testing against "Delete" (mixed
case). Try changing this line of code to the following and see if that makes
your code work...

While ActiveCell.Text < "DELETE"

Rick Rothstein (MVP - Excel)


I changed the word Delete to all caps and it seemed to work. However,
when it completes, the message box says "0 milliseconds" and it still
appears to run until I hit OK. Is this what it is supposed to do?
Overall it took about 5 minutes to delete the rows on 8 tabs.

On a side note, what is interesting is that the time it takes do
delete the rows is inverse to the amount of "DELETE" rows I have. For
instance, the spreadsheet I scale down with the most "DELETE"S, has
about 7,750 "DELETE"'s. (I am only keeping 250 rows). It takes about
25 seconds to cycle through. The spreadsheet with the least amount of
deletes (4,500 rows to Delete), it takes about 5 minutes. It just
seems like the more rows it has to delete, the longer it should take.
Just an observation.

Thank you again for your help!