Keep text from string before certain character


I have a string like so “Jason Bourne - United States”
The string collects name with nationality divided by “-” from a source but I want to take only the name.
How can I do that?

Input String: Jason Bourne - United States
Output String: Jason Bourne

@dvn You can use Split Method to Achieve that :
Use this in a message Box and Check :
Split(“Jason Bourne - United States”,"-")(0)

1 Like