LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default exel macro to eliminate duplicate record

There's really no need to make cells active this way - unless you like to
see the screen updating.

Sub Delete_Row()

Dim target as range
set target = activecell
Do

If Target.Value = Target.Offset(1, 0).Value Then
Target.Offset(1, 0).EntireRow.Delete
Else

Ste target = target.Offset(1, 0)
End If

Loop While target.value< ""

End Sub




--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"Soo Cheon Jheong" wrote in message
...
Try

Sub Delete_Row()

Do

If ActiveCell.Value = ActiveCell.Offset(1, 0).Value Then
ActiveCell.Offset(1, 0).EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If

Loop While ActiveCell < ""

End Sub

__





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eliminate Duplicate Row Chip Excel Discussion (Misc queries) 1 September 25th 09 09:18 PM
how to eliminate duplicate numbers OPer Excel Worksheet Functions 5 September 11th 09 10:29 PM
Eliminate duplicate values in drop down list irvine79 Excel Discussion (Misc queries) 1 February 3rd 09 09:30 PM
Eliminate Duplicate Rows - Add columns Accordingly meendar Excel Discussion (Misc queries) 1 April 11th 06 05:15 PM
How to eliminate duplicate entries Tara Keane Excel Discussion (Misc queries) 4 March 2nd 05 05:33 PM


All times are GMT +1. The time now is 01:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"