I've written code that goes through a list of items and sums the quantities, but it's rather slow, so I'd like to find something that runs quicker.
Please Login or Register to view this content.
I've written code that goes through a list of items and sums the quantities, but it's rather slow, so I'd like to find something that runs quicker.
Please Login or Register to view this content.
Hello yawnzzzz,
Deleting the rows is what is taking the time. Unless you have some need to delete all these rows on the worksheet, you could copy the unique values and their sums over to a different worksheet. That would speed the process up considerably.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
I guessed that was part of it.
I'll elaborate on my problem some more then by saying that there's 24 columns worth of data tied to each item.
Is the copy/paste commands going to be the quickest way to copy all 24 columns or is there a faster way?
I went searching, and I saw an example that is supposed to be quicker than copy and paste:
I'm trying to use that for my own example.Please Login or Register to view this content.
Any ideas why I'm getting a method 'Range' of object '_Worksheet' failed error message?Please Login or Register to view this content.
I tried this code, and it worked.
Using this code, it took 26 seconds to run my test.Please Login or Register to view this content.
Using this code, it took 28 seconds to run my test.Please Login or Register to view this content.
Using my original deleting methodology took 23 seconds....
Any other ideas?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks