fenerbhace
New Member
- Joined
- Jun 14, 2018
- Messages
- 1
Hi guys,
im new here and have a question.
I have a table with 14 colums. In colum D are costumer numbers. I want to check with a VBA if a costumer number inside more than one time.
In colum C are order quantities. If the costume numer dublicate i want to sum all of the order quantities from this costumer number and delet all dublikates.
Im sry for my bad english.
http://up.picr.de/32969679oo.jpg
Sub tester()letzte_Zeile = Sheets(1).UsedRange.SpecialCells(xlCellTypeLastCell).Row
For i = 1 To letzte_Zeile
For j = 2 To letzte_Zeile
If Cells(i, 4).Value = Cells(j, 4).Value Then
Cells(i, 3) = Cells(i, 3) + Cells(j, 3)
Rows(j).Delete
End If
Next j
Next i
End Sub
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">order quantitiesorder quantities</body>
im new here and have a question.
I have a table with 14 colums. In colum D are costumer numbers. I want to check with a VBA if a costumer number inside more than one time.
In colum C are order quantities. If the costume numer dublicate i want to sum all of the order quantities from this costumer number and delet all dublikates.
Im sry for my bad english.
http://up.picr.de/32969679oo.jpg
Sub tester()letzte_Zeile = Sheets(1).UsedRange.SpecialCells(xlCellTypeLastCell).Row
For i = 1 To letzte_Zeile
For j = 2 To letzte_Zeile
If Cells(i, 4).Value = Cells(j, 4).Value Then
Cells(i, 3) = Cells(i, 3) + Cells(j, 3)
Rows(j).Delete
End If
Next j
Next i
End Sub
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">order quantitiesorder quantities</body>