Manolocs,
Thanks for your workbook/worksheet.
Here is a macro solution for you to consider, that does not do any looping in your raw data rows, and, uses columns C, and, D, as a work area.
In column C, beginning in cell C3, I am concatenating A3 and B3.
In column D, I am putting a countif formula that will result in an error #N/A if the count is greater then 1. And, using specialcells, we delete any row in column D that contains the error #N/A.
Your raw data's last used row is 835. After the macro the last used row is 437.
I have no experience with a Mac, but, the macro is nothing fancy, and, you should give it a try in a copy of your workbook.
Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).
1. Copy the below code
2. Open your NEW workbook
3. Press the keys
ALT +
F11 to open the Visual Basic Editor
4. Press the keys
ALT +
I to activate the Insert menu
5. Press
M to insert a Standard Module
6. Where the cursor is flashing, paste the code
7. Press the keys
ALT +
Q to exit the Editor, and return to Excel
8. To run the macro from Excel press
ALT +
F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.
Code:
Sub DeleteDuplicates()
' hiker95, 11/09/2015, ME900715
Dim lr As Long
Application.ScreenUpdating = False
With Sheets("Sheet1")
lr = .Cells(Rows.Count, 1).End(xlUp).Row
With .Range("C3:C" & lr)
.Formula = "=A3&B3"
.Value = .Value
End With
On Error Resume Next
With .Range("D3:D" & lr)
.Formula = "=IF(COUNTIF($C$3:C3,C3)>1,#N/A,"""")"
.Value = .Value
.SpecialCells(xlCellTypeConstants, xlErrors).EntireRow.Delete xlUp
End With
.Range("C3:D" & lr).ClearContents
End With
Application.ScreenUpdating = True
End Sub
Before you use the macro with
Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension
.xlsm, and, answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
Then run the
DeleteDuplicates macro.