Re: $$Excel-Macros$$ Delete some rows from Excel as per condition

2017-12-07 Thread Paul Schreiner
I looked in your attached macro module and do not see where you included the loop to delete rows by year. Can you send me some sample data as well so I can test/debug the macro you're using? Paul- “Do all the good you can, By all the means you can, In all t

Re: $$Excel-Macros$$ Delete some rows from Excel as per condition

2017-12-07 Thread Pravin Gunjal
Dear Mr.Paul, Thanks for your reply. I tried using this code in the existing macro of the file and observed that, it deletes only the year 2012 and not 2011. Also it has deleted the header row apart from old years, which shouldn't do. The existing macro is attached for your immediate reference. P

Re: $$Excel-Macros$$ Delete some rows from Excel as per condition

2017-12-05 Thread Paul Schreiner
Sure, the "trick" is that you have to start at the last row and work your way "up". because otherwise, when you delete a row, the "next" row moves up into the  deleted position, then the loop would skip over that record. By starting at the bottom, the row that moves up has already been processed..