G
Guest
Please assist.
I want to remove dupes from my subtotal columns without having to select the
column
Dim oRange As Object
Dim oP_Value As Object
Dim r_counter As Integer
r_counter = 0
Set oRange = Selection
Set oP_Value = oRange.Cells(1)
For r_counter = 2 To oRange.Count
If oRange.Cells(1).Value = InStr(1, "total") Then
If oP_Value.Cells(1).Value = oRange.Cells(r_counter).Value Then
oRange.Cells(r_counter).ClearContents
Else
Set oP_Value = oRange.Cells(r_counter)
End If
Next r_counter
Exit Sub
Thanks
I want to remove dupes from my subtotal columns without having to select the
column
Dim oRange As Object
Dim oP_Value As Object
Dim r_counter As Integer
r_counter = 0
Set oRange = Selection
Set oP_Value = oRange.Cells(1)
For r_counter = 2 To oRange.Count
If oRange.Cells(1).Value = InStr(1, "total") Then
If oP_Value.Cells(1).Value = oRange.Cells(r_counter).Value Then
oRange.Cells(r_counter).ClearContents
Else
Set oP_Value = oRange.Cells(r_counter)
End If
Next r_counter
Exit Sub
Thanks