Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete Duplicate rows in an Excel list
|
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete Duplicate rows in an Excel list
DataFilterAdvanced Filter.
Unique Records and Copy to a new location. Gord Dibben MS Excel MVP |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete Duplicate rows in an Excel list
Well, it is quite uneasy to tell without seeing the worksheet, though I suggest a solution with macro Suppose we have a sheet and we want to delete rows with repeating values in column A then, following macro codes can help Place a command button on the sheet1 from control box, open the code window and paste following codes Code: -------------------- Private Sub CommandButton1_Click() Dim row As Integer, col As Integer row = 1 col = 1 While Sheet1.Cells(row, col).Value < "" deleteDuplicate row, Sheet1.Cells(row, col).Value row = row + 1 Wend End Sub Private Sub deleteDuplicate(i As Integer, str As String) Dim row As Integer, col As Integer row = i + 1 col = 1 While Sheet1.Cells(row, col).Value < "" If Sheet1.Cells(row, col).Value = str Then Sheet1.Rows(row).Delete End If row = row + 1 Wend End Sub -------------------- Chris ------ Convert your Excel spreadsheet into an online calculator. http://www.spreadsheetconverter.com -- Chris Bode |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete duplicate rows | Excel Worksheet Functions | |||
How do i delete duplicate rows in an Excel Spread Sheet | Excel Worksheet Functions | |||
How do I find duplicate rows in a list in Excel, and not delete it | Excel Discussion (Misc queries) | |||
How do I delete duplicate rows in an excel spreadsheet? | Excel Discussion (Misc queries) | |||
How to delete duplicate rows in Excel 2000? | Excel Discussion (Misc queries) |