Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to delete that row if same cell in preceding row is identical
I have data that duplicates a cell in the previous row and I want to delete
the second row each time that happens. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to delete that row if same cell in preceding row is identical
Sub NewOne() Do Until ActiveCell.Value = "" If ActiveCell.Value = ActiveCell.Offset(-1, 0).Value Then ActiveCell.EntireRow.Delete Shift:=xlUp ElseIf ActiveCell.Value < ActiveCell.Offset(-1, 0).Value Then ActiveCell.Offset(1, 0).Select End If Loop End Sub "Ronmarco" wrote: I have data that duplicates a cell in the previous row and I want to delete the second row each time that happens. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to delete that row if same cell in preceding row is identical
"Office_Novice" wrote in message
... ActiveCell.EntireRow.Delete Shift:=xlUp For reference, when you delete an entire row, there's only one way to shift.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional formatting dependent of preceding cell | Excel Discussion (Misc queries) | |||
Delete Non-identical but Similar Records | Excel Discussion (Misc queries) | |||
fill cell with colour if preceding cell is a negative value | Excel Discussion (Misc queries) | |||
How do I reference a cell to another in the preceding worksheet | Excel Worksheet Functions | |||
I have 2 identical workbooks within 1 file, how do I delete 1? | Excel Worksheet Functions |