Delete Row Macro - if cell > $5000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

How do I delete a rows in Column F if a cell reflects a value of more than
$5,000.

Thanks
 
You can do it with a VBA macro:

Sub AAA()
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "F").Value > 5000 Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub



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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top