Prev: Setting up a formula (when F2<11,000)=$25
Next: Need help with formulae comparing date-based numbers
From: Max2073 on 16 Mar 2010 11:13 I'm trying to delete all rows that DO NOT contain the text "ENTER" in column F. I have tried a few different methods based upon research from this site, but I'm struggling to change them, to delete all rows that DO NOT contain the "ENTER". I need to use the wildcard as most of the cells contain additional data. How can I change this to delete rows that DO NOT contain the "ENTER" For i = 672 To 1 Step -1 If Cells(i, "J") Like "*UASGN*" Then Rows(i & ":" & i).Delete Next i Thanks.
From: Jacob Skaria on 16 Mar 2010 11:15 Check your other post -- Jacob "Max2073" wrote: > I'm trying to delete all rows that DO NOT contain the text "ENTER" in column > F. > I have tried a few different methods based upon research from this site, but > I'm struggling to change them, to delete all rows that DO NOT contain the > "ENTER". I need to use the wildcard as most of the cells contain additional > data. How can I change this to delete rows that DO NOT contain the "ENTER" > > For i = 672 To 1 Step -1 > If Cells(i, "J") Like "*UASGN*" Then Rows(i & ":" & i).Delete > Next i > > > Thanks.
From: Don Guillett on 16 Mar 2010 11:24
Sub findenter() For i = Cells(Rows.Count, "f").End(xlUp).Row To 1 Step -1 If InStr(UCase(Cells(i, "f")), "ENTER") < 1 Then rows(i).delete 'MsgBox i Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "Max2073" <Max2073(a)discussions.microsoft.com> wrote in message news:8A4DBD7B-008F-4E2A-BB2A-A66BD7603230(a)microsoft.com... > I'm trying to delete all rows that DO NOT contain the text "ENTER" in > column > F. > I have tried a few different methods based upon research from this site, > but > I'm struggling to change them, to delete all rows that DO NOT contain the > "ENTER". I need to use the wildcard as most of the cells contain > additional > data. How can I change this to delete rows that DO NOT contain the > "ENTER" > > For i = 672 To 1 Step -1 > If Cells(i, "J") Like "*UASGN*" Then Rows(i & ":" & i).Delete > Next i > > > Thanks. |