i have managed to get a code working for removing duplicates from the table column
Private Sub CommandButton2_Click()
Dim iListCount As Integer
Dim iCtr As Integer
' Turn off screen updating to speed up macro.
Application.ScreenUpdating = False
' Get count of records to search through.
iListCount = Sheets("SUMMARY DATA").Range("SUMDATA[Job Number]").Rows.Count
Sheets("SUMMARY DATA").Range("SUMDATA[Job Number]").Select
' Loop until end of records.
Do Until ActiveCell = ""
' Loop through records.
For iCtr = 1 To iListCount
' Don't compare against yourself.
' To specify a different column, change 1 to the column number.
If ActiveCell.Row <> Sheets("SUMMARY DATA").Cells(iCtr, 1).Row Then
' Do comparison of next record.
If ActiveCell.Value = Sheets("SUMMARY DATA").Cells(iCtr, 1).Value Then
' If match is true then delete row.
Sheets("SUMMARY DATA").Cells(iCtr, 1).Delete xlShiftUp
' Increment counter to account for deleted row.
iCtr = iCtr + 1
End If
End If
Next iCtr
' Go to next record.
ActiveCell.Offset(1, 0).Select
Loop
Application.ScreenUpdating = True
MsgBox "Done!"
End Sub
now i just need a code to add to columns together under one the run the above
any ideas?
Bookmarks