If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Delete Rows using If and Wildcard
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. |
#2
|
|||
|
|||
Delete Rows using If and Wildcard
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. |
#3
|
|||
|
|||
Delete Rows using If and Wildcard
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 "Max2073" wrote in message ... 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. |
Thread Tools | |
Display Modes | |
|
|