LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Greg B...
 
Posts: n/a
Default Assistance with code Please

I have copied the code below to see if someone can help me with my problem.
I work great unfortunately it needs to check from cells d2 to d101. I have
to hit run about 5 times for the whole range to be cleared. I sthere anyway
to loop it until it is done or have it complete in one shot.

Can someone tell me what I am doing wrong

Sub CopyData()
Dim rng As Range, cell As Range, col As Long
Dim rw As Long, rng2 As Range
col = 4
rw = 1

With Worksheets("SCHEDULE")
Set rng = .Range(.Cells(col), .Cells(Rows.Count, col).End(xlUp))
End With
For Each cell In rng
If LCase(cell.Value) = "yes" Then
cell.EntireRow.Delete

End If
Next

End Sub
Thanks in advance

Greg



 
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
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM
Formula assistance required!!! Don Excel Discussion (Misc queries) 4 February 22nd 05 08:34 PM
Help with Amending this Code Please [email protected] Excel Worksheet Functions 4 February 1st 05 07:04 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM


All times are GMT +1. The time now is 08:27 PM.

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"