Simple macro needed but couldn't find what I needed in the forums. I have a spreadsheet that has over 500,000 rows of data. (i wont attach for you). All I need is for the macro to:
Beginning at Row 1, delete row 2 through 1440, and continue until the end. This would essentially leave me what would have been in the 1441st row now in the second row. So on and so forth.
Pretty simple for sure!
Anyone??? Help much appreciated!
Last edited by williampdx; 04-06-2011 at 07:00 PM. Reason: solved
Hi,
How about
HTHSheet1.Range("2:1440").EntireRow.Delete
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
That will not work because it needs to continue down through all 500,000 rows, so that it deletes all rows other than the data contained in the 1st row, 1441st row, 2881st row, etc all the way down. Get it??
Hi,
Rather than using a looping macro why not use a helper column and enter the formula
in row 1 and copy down 500,000 rows. Now Filter on the helper column for all cells > 1 and finally select all the filtered rows and delete en bloc. You could record a macro to do that if it's something you need to repeat and it will be a lot quicker than a looping macro.=MOD(ROW(),1441)
HTH
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
You know what, I've been at the computer for too long. That is a much better solution. Not sure why I didn't think of that! Thanks for helping out!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks