Craig,
Try code like the following:
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "B").Value = 0 Then
Rows(RowNdx).Delete
End If
Next RowNdx
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Craig" <(E-Mail Removed)> wrote in message
news:81A76517-49BB-47FF-8B68-(E-Mail Removed)...
>I am trying to create a macro that will delete all rows in a
>worksheet that
> have the value 0 in column B. The macro should only delete rows
> where the
> value equals 0, and not rows where the value contains 0 (for
> example, 10).
>
> Ideally I'd like to have this in a form that I could edit in
> the future, so
> that if down the road I wanted to change the macro to delete
> all rows where
> column F contained the value "Elephant", I could do so without
> starting from
> scratch.
> thank you,
> Craig