View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Need Help with ActiveCell.EntireRow.Delete

Ayo

Are you sure the values are equal in the un-deleted cells?

Maybe an extra space?


Gord Dibben MS Excel MVP

On Fri, 18 Jul 2008 20:05:00 -0700, Ayo wrote:

This one gave me the same result as what I had before.

"Jarek Kujawa" wrote:

try this:

Private Sub cmdCopy_Click()
Dim ClastRow As Integer, c As Range


Worksheets("BulkUploadReport 1 ").Delete
Windows("BulkUploadReport 1 .xls").Activate
Sheets("BulkUploadReport 1 ").Select
Sheets("BulkUploadReport 1 ").Copy
After:=Workbooks("Vista.xls").Sheets(1)


Sheets("BulkUploadReport 1 ").Select
ClastRow = ActiveCell.SpecialCells(xlCellTypeLastCell).Row
For Each c In ActiveSheet.Range("E2:E" & ClastRow).Cells
If c.Value < Worksheets("Sheet1").Range("I16").Value Then
c.EntireRow.Delete
End If
Next c
End sub


HIH