Hi everyone!!
Good afternoon!!
I have this macro:
Sub sumarizar_duplicados()
Dim LR As Long, i As Long
LR = Range("C" & Rows.Count).End(xlUp).Row
Range("C4:C" & LR).Sort Key1:=Range("C4"), Order1:=xlAscending
For i = LR To 2 Step -1
If Cells(i, "C").Value = Cells(i - 1, "C").Value Then
Cells(i - 1, "H").Value = Cells(i - 1, "H").Value + Cells(i, "H").Value
Rows(i).Delete
End If
Next i
End Sub
And Works, but the information is incorrect, maybe it's a problem in the order..
The purpose of the macro is to detect if there are duplicates values in column "B" and sum in the column "H"
.. attach the file!!
Thanks again!
Best Regards!!
captura.jpg
Bookmarks