Hello everybody
I found this code
It's supposed to delete every Nth row ..![]()
Please Login or Register to view this content.
I don't know how to use it?
I tried a lot but failed
Hello everybody
I found this code
It's supposed to delete every Nth row ..![]()
Please Login or Register to view this content.
I don't know how to use it?
I tried a lot but failed
You need to call it from another sub, given that you have parameters involved. Try:
![]()
Please Login or Register to view this content.
Mr. Berlan
That's great and simple .. So perfect
Thanks a lot
I tried the code with 10000 rows .. It took very long time and I had to press Ctrl + Pause Break to stop it .. And no rows had been deleted!
Is there a faster code that can do that task?
Hi,
I rewrote it a bit and added turned of screenupdating and calculation, etc. during the procedure (which you can integrate in your first script instead if needed). Added a parameter t
Try this:
Best,![]()
Please Login or Register to view this content.
berlan
Last edited by berlan; 03-04-2015 at 11:23 AM. Reason: Notice minor edit
Does this help?
![]()
Please Login or Register to view this content.
@John, only problem with that one is that it will recalculate every time you delete a row and slow down the process even more. Or if calculation is turned off, there will still be more interaction with Excel for each deletion, I'm afraid, but haven't tried on a large sample.
berlan
I tested on 10000 rows. It took less then 15 seconds. Of course room for improvement. But my first goal was to get the rows deleted.
Thanks everybody for these great help
I tried a combination of both codes and it took only 7 seconds for me
![]()
Please Login or Register to view this content.
You're welcome. I thought you wanted every 9th row, the code you posted is for every 2 rows.
Here is another way.. for testing..
![]()
Please Login or Register to view this content.
Regards!
=DEC2HEX(3563)
If you like someone's answer, click the star to give them a reputation point for that answer...
Thanks a lot Mr. Debraj for this code
I tried to make it delete every 2nd row by changing this line
But I encountered an error (Object required) at this line![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
ok.. I missed that part..
![]()
Please Login or Register to view this content.
Thanks a lot Mr. Debraj Roy
The code in post #8# takes about 3 seconds but your working code takes about 6 seconds !
Although I added the parts of disabling screenupdating and calculation for your code .. But I preferred your way of thinking about using filter
![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks