Sub removerAntigo()
Dim UltimaLinha As Long
UltimaLinha = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Dim i As Long
For i = 2 To UltimaLinha
If Cells(i, 1).Value = "" Then Exit Sub
If Cells(i, 3) = Cells(i + 1, 3) Then
If Cells(i, 1) <= Cells(i + 1, 1) Then
Rows(i).Delete
If i = 2 Then i = 1
End If
End If
Next i
End Sub
I ended up doing a scope here but I haven’t succeeded yet, my macro deletes values, but it doesn’t keep the plates equal with the same date, as shown in the question image. Also, it’s not just a plaque, this was an example, I didn’t bother to mention it before. In short: I will paste a report of a certain date range (1 week for example) and want to make sure that I will not have duplicity at the time I use it to analyze the data. Being a transport report, where I can have more than one knowledge per board (as is the case of the day 26/09 in the image), and different boards in the report, always keeping the latest.
Read the Manual on how NOT to ask questions and also read What a mistake I made asking my question?
– Solkarped
Thanks for the tip, I’ll rephrase later
– Roberto C. Borges Jr.