Try something like
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If StrComp(Cells(RowNdx, "B"), "assets", vbTextCompare) < 0
Then
Rows(RowNdx).Delete
End If
Next RowNdx
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"JOUIOUI" wrote in message
...
I have a spreadsheet that will very in row count every day. I
only want to
keep the rows that contain the text "Assets". This criteria
will be in
column B. I have an existing macro that adds the page
formatting. Can I add
code to this macro to delete everything that does not include
Assets in
Column B. Thanks so much.