I want to delete all rows that do not contain the value \"Total\" in Range(\"B11:B25\").
Below is my code.
Dim cell As Range For Each cell In Range(
try this, it will loop from row 25 to 11 backwards and find anything not "Total"
Dim i As Integer For i = 25 To 11 Step -1 ' change to whatever row you want If Range("B" & i) <> "Total" Then Range("B" & i).EntireRow.Delete End If Next