Excel Vba Code Help

I have a macro that perfectly runs as required for a given set of data. However,when I double the data, after some time I get an error.

“Run-Time error 1004:
Delete Method of range class failed”.

When I debug, it highlights this line of the code.

Sheets(q).Range(Sheets(q).Cells(lRow, 1), Sheets(q).Cells(lRow, 1).End(xlDown).Offset(-5)).EntireRow.Delete

I don’t know if this is as a result of not having enough memory on my PC or something to do with the code.

My requirement is to have some one have a look at the attachment and see if it can be solved. That is be able to run the 88 matrices and more.

To test the data, the starting position is D4. There are 88 matrices, 49 of them are processed perfectly well.

P.S The file is large so if your PC is low on memory, it will take quite some time or even crush.

Leave a Reply

Your email address will not be published. Required fields are marked *