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: 27,285
Default Macro or VBA

Don's code performs the same equality test as Greg's and is much simpler by
looping in reverse and requiring no selection. Think you wasted your time
not adequately testing it. I ran it on the data you posted and it did
exactly what you asked.

--
Regards,
Tom Ogilvy


"GAIL HORVATH" wrote in message
...
Doesn't work. I probably wasn't clear in what I needed. This is a better
example It is whwn A2=A3 etc that I want the entire row deleted
e.g.
A B C D E
Acct # MedRec# field field field
112233 xxx xxx xxx xxx
112233 xxx xxx xxx yyy
123123 xxx xxx xxx xxx
123412 xxx xxx xxx xxx
123412 xxx xxx xxx ttt
123412 xxx xxx xxx sss
--
Gail M Horvath


Eastern Time Zone
"Don" wrote in message
...
Gail,

How about:

Sub DeleteDupRows()
With ActiveSheet
For iRow = 100 To 2 Step -1 'change 100 to last row
If Cells(iRow, 1) = Cells(iRow - 1, 1) Then
Cells(iRow, 1).EntireRow.Delete
End If
Next iRow
End With
End Sub

Don Pistulka


"GAIL HORVATH" wrote in message
...
I hane a column in a spread sheet whose values at times are repeats of
the cell above. I want that row deleted if the value is the same as the cell
above is there a way to do it programaticallY?

e.g.
A B C D E
Acct # MedRec# field field field
112233 xxx xxx xxx xxx
112233 xxx xxx xxx yyy
123123 xxx xxx xxx xxx
123412 xxx xxx xxx xxx
123412 xxx xxx xxx ttt
123412 xxx xxx xxx sss

I would want the rows in bold red deleted

--
Gail M Horvath




 
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 09:18 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"