Thread: Delete Rows
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
scottymelloty[_5_] scottymelloty[_5_] is offline
external usenet poster
 
Posts: 1
Default Delete Rows


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 th
sheet i am in when i run it, how do i get it to go through all th
sheets in the workbook to check for " v " and delete them as well.

Many Thank

--
scottymellot
-----------------------------------------------------------------------
scottymelloty's Profile: http://www.excelforum.com/member.php...nfo&userid=380
View this thread: http://www.excelforum.com/showthread.php?threadid=27150