Thread: deleting row
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John via OfficeKB.com John via OfficeKB.com is offline
external usenet poster
 
Posts: 2
Default deleting row

My macro doesn't seem to do anything could I have some input?

Dim lastrow As Long, i As Long
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = lastrow To 1 Step -1
If LCase(Cells(i,"Q").Value) = "Closed" Then
Rows(i).Delete
End If
Next
End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200703/1