Okay so this is what ended up working (the original post code is the third section of this sub):
Sub Step6()
Dim c As Long
Dim x As String
Application.ScreenUpdating = False
'Creates new column, rename columns to "Status" and "Benefit Group"
With ActiveWorkbook.ActiveSheet
c = .Rows(1).Find("Plan Code and Extension").Column
.Columns(c + 1).EntireColumn.Insert
.Cells(1, c + 1).Value = "Benefit Group"
.Cells(1, c).Value = "Status"
End With
'Loops through the column and split the text to two 3-character strings into the two columns
i = 2
Do Until IsEmpty(ActiveWorkbook.ActiveSheet.Cells(i, 1))
x = Cells(i, c).Text
Cells(i, c) = Left(x, 3)
Cells(i, c + 1) = Right(x, 3)
i = i + 1
Loop
'Filters and delete rows with Status not equal to "RET" or "ACT"
ActiveSheet.AutoFilterMode = False
With ActiveSheet
.Columns(c).AutoFilter Field:=1, Criteria1:="<>RET", Operator:=xlAnd, Criteria2:="<>ACT", Operator:=xlFilterValues
.Columns(c).Resize(Rows.Count - 1).Offset(1).EntireRow.Delete
.AutoFilterMode = False
End With
ActiveSheet.AutoFilterMode = False
Application.ScreenUpdating = True
End Sub
Bookmarks