Thread: Run-time error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Run-time error

Charlie,

Try something like

If Cells(i,"U").Value = "Yes" Then
Rows(i).Delete
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"ljCharlie " wrote in
message ...
Here's the code:

If U.Cells(i).Value = "Yes" Then
Selection.Rows(i).EntireRow.Delete
End If

I'm trying to compare the cell value in column U to see if it

equals
the word "Yes" and if it is, delete the whole entire row. The

error was
Run-time error 424 Object require at the above code.

Any suggestion is apreciated.

ljCharlie


---
Message posted from http://www.ExcelForum.com/