Here's a macro to remove the ones that net to zero (assuming you are taking
my advice to copy the sheet first and run two macros, one to remove net
zeros, and the other to remove those that don't net to zero).
Sub RemoveNetZeros()
Dim MyFirstRow, MyLastRow As Long
Dim MyValue As Double
Do While ActiveCell.Value <> ""
Do Until Abs(ActiveCell.Value) <> Abs(ActiveCell.Offset(1, 0).Value)
If Abs(ActiveCell.Value) = Abs(ActiveCell.Offset(1, 0).Value) And _
Abs(ActiveCell.Value) <> Abs(ActiveCell.Offset(-1, 0).Value) Then
MyFirstRow = ActiveCell.Row
End If
MyValue = MyValue + ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Loop
MyLastRow = ActiveCell.Row
MyValue = MyValue + ActiveCell.Value
If MyValue = 0 Then
Range(Cells(MyFirstRow, ActiveCell.Column), Cells(MyLastRow,
ActiveCell.Column)).Select
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
MyValue = 0
Loop
End Sub
You start this macro with the activecell being the first value at the top
(row 2 if you have labels in row 1).
As always, test on sample data first to make sure desired results are
obtained. I tested and it worked for me, regardless of the data in the first
few rows, which is where the macro would have been most likely to fail. For
example, I tested it on the first absolute value being in row one only, in
rows one and two only, and in rows one through three only. Worked on all for
me.
Hope this helps. I'll try to send the macro to remove those that don't net
to zero if time allows.
Keith