LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Double Delete

I have this macro

Dim myLastRow As Long
Dim r As Long
Dim c As Range
myLastRow = ActiveSheet.Cells(10000, 4).End(xlUp).Row
For r = myLastRow To 1 Step -1
Set c = ActiveSheet.Range("D" & r)
If c.Value = "Back" Then
c.EntireRow.Delete
End If
Next r

What can I add to this macro so that it in addition to deleting the entire
row if it finds "Back" in Column D, it also deletes the entire row above it?

 
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
Double Double Quotes [email protected] Excel Programming 5 June 20th 07 02:14 PM
double axis, double problem (i hope only to me) kitcho Charts and Charting in Excel 1 December 30th 06 12:52 AM
Delete row if double bahri Excel Discussion (Misc queries) 2 August 5th 06 04:20 PM
Textboxes - restrict double-click and selection.delete [email protected] Excel Programming 0 May 18th 06 09:07 PM
Generate permutations but delete double entries as_sass[_11_] Excel Programming 3 April 12th 06 07:32 PM


All times are GMT +1. The time now is 04:02 AM.

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

About Us

"It's about Microsoft Excel"