Hello so I am trying to help the workflow at my job. We have to import two files not .txt that come from two different databases. I created an excel macro that imports the two files with a refresh using get external function option. I would delimit them but that's later. Next I would like to go through and delete the cells that have blanks and bad characters in Column A Starting from row A2. I'm really new and haven't had to script in a longtime due to my job. This is what I have and have trying to tweak. Now the loop deletes almost everything!! Please help. Yes I have looked on all of the forums for help and nothing has worked.
Sub DeleteBadRows()
Dim i As Variant
Dim RowNbr As Long
Dim ColNbr As Long
Dim BadChr() As Variant
Dim LR As Long
BadChr = Array("=", "*", ",FEE", "DATE 12/13", ",(", "SMSLIST O", "REQUEST T", "WHERE", "SVC") 'include any characters to trigger deletion of row
LR = Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
For RowNbr = LR To 1 Step -1
For ColNbr = 1 To Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Column
For i = LBound(BadChr) To UBound(BadChr)
If InStr(Cells(RowNbr, ColNbr), BadChr(i)) Then
Cells(i).EntireRow.Delete
Exit For
End If
Next i
Next ColNbr
Next RowNbr