Hello,
I need a REALLY QUICK reply. I'm working on a worksheet in excel that has hundreds of rows and I want to delete every 2 consecutive rows and leave the 3rd one. That is I want to delete rows 2&3, 5&6 etc. How can I do that? Thnx
Hello,
I need a REALLY QUICK reply. I'm working on a worksheet in excel that has hundreds of rows and I want to delete every 2 consecutive rows and leave the 3rd one. That is I want to delete rows 2&3, 5&6 etc. How can I do that? Thnx
dreamer_886,
Give this a try:
Please Login or Register to view this content.
How to use a macro:
- Make a copy of the workbook the macro will be run on
- Always run new code on a workbook copy, just in case the code doesn't run smoothly
- This is especially true of any code that deletes anything
- In the copied workbook, press ALT+F11 to open the Visual Basic Editor
- Insert | Module
- Copy the provided code and paste into the module
- Close the Visual Basic Editor
- In Excel, press ALT+F8 to bring up the list of available macros to run
- Double-click the desired macro (I named this one OnlyKeepEveryThirdRow)
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
oh god I think it actually worked! Thank you so much, you're a life saver
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks