I want to search a range for a string, then extract a substring from the string. The format of the string is xxx-xxx-xxx-xxx, where the x's may be letters or numbers. I am trying to identify the substring in reference to the "-". This code returns the "type mismatch" error on the line before End If.
For m = 7 To 16
If InStr(EIRPBudget.Cells(m, 12), "-") Then
FilterDescrip = EIRPBudget.Cells(m, 12)
EIRPSummary.Range("V" & i + 5) = Split(FilterDescrip, "-")(0)
End If
Next
Any assistance would be appreciated.