Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works perfectly! This is exactly what I needed. Thank you so much!
"Gary''s Student" wrote: Try: Sub CleanA() Dim n As Long n = Cells(Rows.Count, "A").End(xlUp).Row For i = n To 2 Step -1 m = Application.WorksheetFunction.CountIf(Range("A1:A" & i), Range("A" & i).Value) If m 1 Then Range("A" & i).Delete Shift:=xlUp End If Next End Sub -- Gary''s Student - gsnu201001 "MCRH" wrote: Hi, I've seen other questions regarding deleting duplicates but none of them quite fit what I need. I have values in column A. I want to delete the cell (shift up) of any and all exact duplicates, but keep the original. Thanks for your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find duplicate, save in a list, delete duplicate using macro | Excel Programming | |||
how do i delete duplicate cells in the same row | Excel Discussion (Misc queries) | |||
How do I delete duplicate cells? | Excel Worksheet Functions | |||
using a macro to delete duplicate data (cells) | Excel Programming | |||
using a macro to delete duplicate data (cells) | Excel Programming |