View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Pyrotoy Pyrotoy is offline
external usenet poster
 
Posts: 11
Default Macro needed to identify value and delete row if value below t

Rick: Works perfectly. Thanks for the fast response. Best wishes, Scott

"Rick Rothstein" wrote:

Give this macro a try...

Sub RemoveRowsLessThan15()
Dim X As Long
With Worksheets("Sheet1")
For X = .UsedRange.Rows.Count To 1 Step -1
If IsNumeric(.Cells(X, "J").Value) Then
If .Cells(X, "J").Value < 15 Then .Rows(X).Delete
End If
Next
End With
End Sub

--
Rick (MVP - Excel)


"Pyrotoy" wrote in message
...
I need a macro that will locate a numeric value in column J only, and if
that
value is less than 15, the entire row on which that value is located will
be
deleted. Thank you.