Awesome. I've modified it just a little because I changed it so the person pulling the report can choose all fields and first it will delete the unneeded columns based on their headers. This now makes column D where all the action happens. One last challenge I'm facing. When it finishes, row 1, which contains my header is also somehow changed. I tried a few things to make it start in Row 2 but I've not been successful. Help is appreciated.
Sub RemoveDupes()
Dim LR As Long
Dim COL As Long
Dim a As Long
Application.ScreenUpdating = False
For a = 25 To 1 Step -1
Select Case Cells(1, a).Value
Case "Call flow", "Call type", "Application", "Ringing started", "Call answered", "Call disposition", "Charging plan", "Call cost", "Money unit", "Transfer source", "Transfer destination", "Initially called extension", "Callback CallerID", "Calling card code", "Flow reference extension"
Cells(1, a).EntireColumn.Delete
End Select
Next a
Application.ScreenUpdating = True
LR = Range("E" & Rows.Count).End(xlUp).Row
With Range(Cells(1, Columns.Count), Cells(LR, Columns.Count))
.FormulaR1C1 = "=INT(RC5)"
.Copy
Range("E1").PasteSpecial xlPasteValues
.FormulaR1C1 = "=IF(COUNTIF(R1C5:RC5, RC5) = 1, 1, """")"
.SpecialCells(xlCellTypeFormulas, 2).EntireRow.Delete xlShiftUp
.ClearContents
End With
End Sub
Bookmarks