22
5
I am looking for a way to extract a variable length substring from a string.
My cells will look something like:
ABC - DEF
ABCDE - DEF
ABCD - ABC
I want to split the string at the -
character, so the cells will become:
ABC
ABCDE
ABCD
This should be done with a formula and not VBScript.
I am using Excel 2010
EDIT
I found that the dataset doesn't always contain the -
character, meaning there should be no change.
this does the trick also
=MID(a1,FIND("-",a1)+1,LEN(a1))
without any "extra-cellular" references ) – Mikey – 2016-03-18T18:01:59.153