LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Deleting duplicates

I found this code he

Sub DeleteDuplicates()
'Deletes Duplicates in column called out "C"
Dim LastRow As Long
Dim i As Long
Application.ScreenUpdating = False
LastRow = Range("C" & Rows.Count).End(xlUp).Row
For i = LastRow To 1 Step -1
If WorksheetFunction.CountIf(Range("C:C"), Range("C" & i)) 1 Then
Range("C" & i).EntireRow.Delete
End If
Next 'i
Application.ScreenUpdating = True
End Sub

I am needing this changed to only delete column C and D.

Thanks in advance.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Duplicates Angie M. Excel Worksheet Functions 2 February 4th 10 03:55 PM
Deleting duplicates katana Excel Discussion (Misc queries) 4 February 7th 06 06:33 PM
Deleting Duplicates halem2[_46_] Excel Programming 1 October 19th 04 10:28 PM
Deleting Duplicates Charles Deng Excel Programming 3 May 12th 04 05:40 PM
deleting duplicates [email protected] Excel Programming 3 November 13th 03 04:38 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"