Hi
try:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
dim wks as worksheet
application.screenupdating=false
for eack wks in worksheets
LastRow = wks .Cells(Rows.Count, "D").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "D").Value = " v " Then
Rows(RowNdx).Delete
End If
Next RowNdx
next wks
application.screenupdating=true
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
"scottymelloty" schrieb im
Newsbeitrag ...
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "D").Value = " v " Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub
This code deletes rows with " v " in Column D but only does it on the
sheet i am in when i run it, how do i get it to go through all the
sheets in the workbook to check for " v " and delete them as well.
Many Thanks
--
scottymelloty
---------------------------------------------------------------------
---
scottymelloty's Profile:
http://www.excelforum.com/member.php...fo&userid=3808
View this thread:
http://www.excelforum.com/showthread...hreadid=271501