Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found this code that Tom Ogilvy created for searching for duplicates and I
was wondering if it is possible to modify the code the search for duplicates based off of what the user selects in a combobox? I know that this code not only searches but also copies, I was just going to leave out the copy part? Sub FindDuplicates() Dim colNum as String Dim rng as range, cell as Range Dim rng1 as Range colNum = "A" With Activesheet set rng = .Range(.Cells(1,colNum), _ .Cells(rows.count,colNum).End(xlup)) End With for each cell in rng if application.Countif(rng,cell) 1 then if rng1 is nothing then set rng1 = cell else set rng1 = Union(rng1,cell) end if end if Next If not rng1 is nothing then rng1.entireRow.Copy Sheets(2).Range("A1") End if End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
NEED HELP MODIFING A CELL | Excel Discussion (Misc queries) | |||
modifing the find function | Excel Discussion (Misc queries) | |||
Modifing a userform txtbox code | Excel Programming | |||
Modifing a recorded macro. | Excel Programming | |||
Modifing data to show up better in chart. | Charts and Charting in Excel |