There’s a RemoveDuplicates
method that you could use:
Sub DeleteRows()
With ActiveSheet
Set Rng = Range("A1", Range("B1").End(xlDown))
Rng.RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
End With
End Sub
More Related Contents:
- Excel Number Separation [closed]
- excel vba compare & copy worksheets from 2 excel files
- VBA Stuck after certain loop
- How to avoid using Select in Excel VBA
- How to return a result from a VBA function
- Cycle through sub-folders and files in a user-specified root directory [duplicate]
- Convert Text to Date?
- Loop through each cell in a range of cells when given a Range object
- Checking for #N/A in Excel cell from VBA code
- Non-web SQL Injection
- Error: “Could Not Find Installable ISAM”
- Properly Handling Errors in VBA (Excel)
- Is there a way to slow down a Web Scraper so it will pick up the code?
- Create a folder and sub folder in Excel VBA
- One-dimensional array from Excel Range
- Renaming Files with Excel VBA
- How to copy only values in excel vba from a range?
- Run a Macro from Another Workbook
- Sorting a dictionary by key in VBA
- Handle “No cells were found” error when filtered range is empty
- VBA paste as values – how to
- Excel: the Incredible Shrinking and Expanding Controls [closed]
- What are the benefits of using Classes in VBA? [closed]
- Generate Word Documents (in Excel VBA) from a series of Document Templates
- Using Excel VBA Macro To Capture + Save Screenshot of Specific Area In Same File
- Type Mismatch in Loop to scan Outlook Messages [duplicate]
- Create folder path if does not exist (saving from VBA)
- Concatenate multiple ranges using vba
- How to highlight selected text within excel
- How to fix a VBA “type mismatch” error after switching to 64-bit Excel