0
The code below identifies the last active line of the worksheet.
When column A is filled in manually it works. But when I put a formula to fill that column according to another spreadsheet. The code keeps running.
For example: the spreadsheet has data up to line 46, but the execution only stops when it reaches line 78, until where I dragged the formula.
lUltimaLinhaAtiva = Worksheets("Painel").Cells(Worksheets("Painel").Rows.Count, 1).End(xlUp).Row
Select all lines in "white" and delete them to see, it should work.
– Reginaldo Rigo
I can’t do that. Because depending on the filter I use in the other sheet the number of rows can increase or decrease
– Jocivan