I have written the following code to remove text after '*' or '-' characters in one of the rows using VBA in Excel but it's giving an error.
Sub Removetext()
For Each c In Range("A1:ZZ1")
c.Value = Left(c.Value, InStr(c.Value, "-") - 1)
Next C
End Sub
How can I remove the text after these characters?