I am facing a minor issue, basically I have successfully done the macro process for one string. But I am unable to process the same vba macro for keeping multiple strings and delete the unwanted data present in the CSV file.
Currently the below code only keeps the rows with string Event Magnitude:
and deletes the rest.
However I want to add multiple strings like Event Duration:
,
Trigger Date:
, Trigger Time:
in the same macro and I am unsure how to do it.
IF I can add multiple strings this macro will check for all 4 strings and keep that data and delete the rest of the data.
Sub DeleteNotMIS()
Dim r As Long, lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
For r = lr To 2 Step -1
If InStr(Cells(r, 1), "Event Magnitude: ") = 0 Then Rows(r).Delete
Next r
End Sub