Hello;
I am beginning to work independently but this request has given me fits. I am attaching an example of my spreadsheet, although the real data is over 50,000 lines.
What I need to do is find duplicates in Column C.
Sum column R for those duplicate values into an inserted Column S, then delete the duplicates that don't have the sum in S.
Once that is done I need to take all the values in R for the non duplicates and copy them into S.
I figured out how to get the Summing done but everything I tried to delete the duplicates and them fill the non duplicates into S has failed. Any Ideas would be great.
The code I used to do the summing was
iLastRow = Cells(Rows.Count, "C").End(xlUp).Row
For i = 2 To iLastRow
If Cells(i, "C").Value = Cells(i - 1, "C").Value Then
If Cells(i, "C").Value <> Cells(i + 1, "C").Value Then
Cells(i, "S").Value = Application.SumIf( _
Columns(3), Cells(i, "C").Value, Columns(18))
End If
End If
Next i
Thanks for any assistance you can give
Gene
Example.xlsx
Bookmarks