Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteDups()
Dim lastrow as Long, i as Long Dim rng as Range With Worksheets("Sheet1") lastrow = .Cells(rows.count,"A").End(xlup).Row for i = lastrow to 2 step - 1 set rng = .Range(.cells(1,"A"),.Cells(i-1,"A")) if application.Countif(rng,.cells(i,"A").Value)0 then rows(i).Delete end if Next End With End Sub -- Regards, Tom Ogilvy "simmerdown" wrote: I have a list of numbers that I want to narrow down to unique numbers....in other words, I want to delete the row if a number show is already displayed elsewhere. Example list: 1 2 2 2 3 4 4 4 I am searching for a macro that will delete the rows containing the extras "2's" and "4's". |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro needed to identify value and delete row if value below targe | New Users to Excel | |||
Macro needed for inserting blank rows | Excel Worksheet Functions | |||
Combing and Adding Data in Multiple Rows (Macro Needed) | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming |