This should delete any non-unique numeric values (non formulaic) from columns A and B and shift all cells up.
For Each c In Range("A:B").SpecialCells( xlCellTypeConstants)
If WorksheetFunction.CountIf(Range("A:B"), c.Value) > 1 Then
Set found = Range("A:B").Find(c.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Unique(found, delItems) Then
start = found.Address
Do
If delItems Is Nothing Then
Set delItems = found
Else
Set delItems = Union(delItems, found)
End If
Set found = Range("A:B").FindNext(found)
Loop While found.Address <> start And (Not found Is Nothing)
End If
End If
Next
delItems.Delete (xlShiftUp)
End Sub
Function Unique(rng1 As Range, rng2 As Range) As Boolean
If (rng2 Is Nothing) Or (rng1 Is Nothing) Then
Unique = True
Else
If Intersect(rng1, rng2).Count >= 1 Then
Unique = False
Else
Unique = True
End If
End If
End Function