Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-17-2014, 08:02 PM
macropod's Avatar
macropod macropod is offline Macro to Delete Duplicate Rows and Retain Unique Value Windows 7 32bit Macro to Delete Duplicate Rows and Retain Unique Value Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try something based on:
Code:
Sub DeleteDuplicateRows()
Dim LRow As Long, i As Long, j As Long
With ActiveSheet
  LRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
  For i = LRow To 2 Step -1
    For j = i - 1 To 1 Step -1
      If .Range("A" & i).Value = .Range("A" & j).Value Then .Range("A" & j).EntireRow.Delete
    Next
  Next
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
delete duplicate, excel macro, filter



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Delete Duplicate Rows and Retain Unique Value Macro to delete all empty rows from all tables braddgood Word VBA 15 10-02-2015 01:54 PM
Macro to Delete Duplicate Rows and Retain Unique Value Word Macro to find and delete rows that contain adjacent cells containing "." AlexanderJohnWilley Word VBA 7 11-08-2012 10:15 AM
Macro to Delete Duplicate Rows and Retain Unique Value Delete all rows but the last. elky1967 Word VBA 14 09-21-2012 05:27 AM
Macro to Delete Duplicate Rows and Retain Unique Value Macro to conditionally delete rows Steve_D Excel 2 08-24-2012 09:37 PM
Macro to Delete Duplicate Rows and Retain Unique Value Macro to delete rows with all empty cells ubns Excel Programming 2 08-14-2012 02:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft