Would it be possible to combine the following two macros into a single macro? Thanks in advance.
Sub DelRows()
Application.ScreenUpdating = False
Dim LastRow As Long
LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("A1:A" & LastRow).AutoFilter Field:=1, Criteria1:="*II*"
Range("A2:A" & LastRow).SpecialCells(xlCellTypeVisible).EntireRow.Delete
If ActiveSheet.AutoFilterMode = True Then ActiveSheet.AutoFilterMode = False
Application.ScreenUpdating = True
End Sub
----------------------------------------------------------------------------------------------------
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000 ; background-color: #ffffff }
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #011993 ; background-color: #ffffff }
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; background-color: #ffffff ; min-height: 13.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000 ; background-color: #ffffff ; min-height: 13.0px}
span.s1 {color: #011993 }
span.s2 {color: #000000 }
</style>
Sub RemoveSingles()
Dim lr As Long, MyList As Variant, i As Long, Names As Variant, j As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
MyList = Range("A2:A" & lr).Value
For i = 1 To UBound(MyList)
Names = Split(MyList(i, 1), ",")
For j = 0 To UBound(Names)
If InStr(Trim(Names(j)), " ") = 0 Then Names(j) = "|"
Next j
MyList(i, 1) = Replace(Replace(Join(Names, ","), "|,", ""), "|", "")
Next i
Range("A2:A" & lr).Value = MyList
End Sub
Sub DelRows()
Application.ScreenUpdating = False
Dim LastRow As Long
LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("A1:A" & LastRow).AutoFilter Field:=1, Criteria1:="*II*"
Range("A2:A" & LastRow).SpecialCells(xlCellTypeVisible).EntireRow.Delete
If ActiveSheet.AutoFilterMode = True Then ActiveSheet.AutoFilterMode = False
Application.ScreenUpdating = True
End Sub
----------------------------------------------------------------------------------------------------
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000 ; background-color: #ffffff }
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #011993 ; background-color: #ffffff }
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; background-color: #ffffff ; min-height: 13.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000 ; background-color: #ffffff ; min-height: 13.0px}
span.s1 {color: #011993 }
span.s2 {color: #000000 }
</style>
Sub RemoveSingles()
Dim lr As Long, MyList As Variant, i As Long, Names As Variant, j As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
MyList = Range("A2:A" & lr).Value
For i = 1 To UBound(MyList)
Names = Split(MyList(i, 1), ",")
For j = 0 To UBound(Names)
If InStr(Trim(Names(j)), " ") = 0 Then Names(j) = "|"
Next j
MyList(i, 1) = Replace(Replace(Join(Names, ","), "|,", ""), "|", "")
Next i
Range("A2:A" & lr).Value = MyList
End Sub