I have the following code:
Sub delete_dc_row()
Dim wbCurrent As Workbook
Dim wsCHINO As Worksheet
Dim wsSTOCKTON As Worksheet
Dim wsFLM As Worksheet
Dim wsDGV As Worksheet
Dim wsAURORA As Worksheet
Dim nLastRow, i As Integer
Set wbCurrent = ActiveWorkbook
Set wsCHINO = wbCurrent.Worksheets("CHINO")
nLastRow = wsCHINO.Cells.Find("*", LookIn:=xlValues, searchorder:=xlByRows, searchdirection:=xlPrevious).Row
For i = nLastRow To 12 Step -1
If InStr(1, wsCHINO.Cells(i, 6).Value, "C ", vbTextCompare) > 0 Then
Else
wsCHINO.Columns(i).Delete Shift:=xlShiftUp
End If
Next i
End Sub
The goal is to look in column F and search for and delete rows that do not contain "C ".
Thank you in advance!
Sub delete_dc_row()
Dim wbCurrent As Workbook
Dim wsCHINO As Worksheet
Dim wsSTOCKTON As Worksheet
Dim wsFLM As Worksheet
Dim wsDGV As Worksheet
Dim wsAURORA As Worksheet
Dim nLastRow, i As Integer
Set wbCurrent = ActiveWorkbook
Set wsCHINO = wbCurrent.Worksheets("CHINO")
nLastRow = wsCHINO.Cells.Find("*", LookIn:=xlValues, searchorder:=xlByRows, searchdirection:=xlPrevious).Row
For i = nLastRow To 12 Step -1
If InStr(1, wsCHINO.Cells(i, 6).Value, "C ", vbTextCompare) > 0 Then
Else
wsCHINO.Columns(i).Delete Shift:=xlShiftUp
End If
Next i
End Sub
The goal is to look in column F and search for and delete rows that do not contain "C ".
Thank you in advance!