Hi

Here's a VBA solution to part A:

Test in a practice workbook first.Code:Sub Remove_Duplicate_Invoices() n = Range("B" & Rows.Count).End(xlUp).Row For i = n To 2 Step -1 If Cells(i, 2).Value = "I" Then Range("A2:A" & i).Name = "r_one" Range("B2:B" & i).Name = "r_two" Range("A" & i).Name = cell If i > [MIN(IF(r_two="I",IF(r_one=cell,ROW(r_one))))] Then Cells(i, 1).EntireRow.Delete End If End If Next i End Sub

As for part B, I'm not quite sure what you are looking for. What do you want the end result to be?

Hope this helps,

Chris.

## Like this thread? Share it with others