Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I have the code below in a sheet, deleting rows that match each other. My problem is that this is very slow to run given that it needs to search & to delete loads of rows. Any ideas out there that could speed this up? Sub DeleteRepeats() Worksheets("Rearranged").Range("h2").Sort _ Key1:=Worksheets("Rearranged").Range("h2") Do Set currentCell = Worksheets("Rearranged").Range("h2") Do While Not IsEmpty(currentCell) Set nextCell = currentCell.Offset(1, 0) If nextCell.Value = currentCell.Value Then currentCell.EntireRow.Delete End If Set currentCell = nextCell Loop Loop Until nextCell = 0 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete Repeated Data? | Excel Discussion (Misc queries) | |||
how to delete repeated character in the coloums or rows | Excel Discussion (Misc queries) | |||
Delete in row C if it is repeated in row D | Excel Worksheet Functions | |||
Delete repeated Cells | Excel Worksheet Functions | |||
delete repeated numbers | Excel Worksheet Functions |