Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am having touble using looping to remove records that contain a D when two are together using the following: Dim constantCells As Range Dim Cell As Range Set constantCells = Sheets("Roster").Range("A:A).SpecialCells(xlConsta nts) For Each Cell In constantCells If Cell.Value 0 Then If Cell.Offset(0, 2) = "D" Then Cell.Offset(0, 0).Resize(6).EntireRow.Delete End If End If Next Cell I know the problem is after the record is deleted the next cell is skipped because the next command is Next Cell. Can someone help me come up with the VBA code that deletes records when the desired records are one after the other? Thanks a million. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=514655 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete records when certain records have duplicate column data | New Users to Excel | |||
looping a 'find and delete' code | Excel Programming | |||
Looping down a Range to delete entire row | Excel Programming | |||
urgent. looping thru all records and applynig formula to get new results | Excel Programming | |||
Looping Through Records. | Excel Programming |