Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I have a column in a spreadsheet with repeated values for e.g a name which
is repeated 5 times I would like to keep the last row containing this value but delete all previous rows i.e in this example i would like to keep row five containing the last occourence of this value and delete all previous rows. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...l-new/200605/1 |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
try this
Sub deleledupsinpreviousrows() For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1 If Cells(i - 1, 1) = Cells(i, 1) Then Rows(i - 1).Delete Next End Sub -- Don Guillett SalesAid Software "mohd21uk via OfficeKB.com" <u20517@uwe wrote in message news:6008940b2b634@uwe... I have a column in a spreadsheet with repeated values for e.g a name which is repeated 5 times I would like to keep the last row containing this value but delete all previous rows i.e in this example i would like to keep row five containing the last occourence of this value and delete all previous rows. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...l-new/200605/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel storing previous cell values in memory | Excel Worksheet Functions | |||
Delete values from cell automatically | Excel Discussion (Misc queries) | |||
Function to find duplicate values, then delete | Excel Worksheet Functions | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
Match Last Occurrence of two numbers and Count to Previous Occurence | Excel Worksheet Functions |