|
-
Oct 30th, 2000, 04:06 PM
#1
Thread Starter
Junior Member
Hello,
I do not seem to be having luck with this vb script in excel:
Sub DeleteRecords()
Dim delCell As Range
For Each delCell In Worksheets("Sheet1").Range("B2:B6")
If delCell.Value = "Del" Then
delCell.EntireRow.Delete
End If
Next delCell
End Sub
I think my "group" (worksheets) is somehow wrong because it will work for a couple of rows (i.e. delCell is each cell searched down B:B for "del"), then it exits! I would greatly appreciate advice if someone knows. Thank you and best regards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|