Hi
you may try the following macro as starting point: It looks in column d
for specific values and if found deletes the rows:
sub delete_rows()
Dim myrows as Long
Dim cell as Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
myrows = Cells(rows.count,4).End(xlup).Row
for i = myRows to 1 step -1
set cell = cells(i,4)
if isnumeric(cell) and not isempty(cell) then
if cell >= 10000 and cell <= 19999 _
or cell >= 40000 and cell <= 49999 _
or cell >= 64152 and cell <= 69999 Then
cell.EntireRow.Delete
end if
end if
Next
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
end sub
--
Regards
Frank Kabel
Frankfurt, Germany
Dmess said:
Trying to apply some Quattro features to Excel.
How do I delete data that matches a criteria range in excel? I would
like to leave the data that does NOT match in the table............