Been hunting for a few hours without success. I'm trying to extract a person's name from the middle of a cell. The names are in Last, First order but have text before / after within the cell.
Ex: 792-12345678-Test Project-Smith, David - technician
For the most part, the text in the cell isn't standardized so the text before / after the names varies both in length and characters, i.e., sometimes there are only two sections separated by hypens and other times they're separated by spaces. The only constants are that the there is always and only one comma in the string (between the Last and First names) and the character just before the last name is a hyphen (-). There are no middle initials of other name elements to consider.
I'm trying to extract just the name portion. I can use MID() to find the comma and go forward. However, I can't figure out how to start at the position of the comma and work backwards to find the 1st hyphen to the left of the comma, which would signify the beginning of the name information. Once I can get to the starting point, I believe I can get the rest.
Ex: 792-12345678-Test Project-Smith, David - technician
For the most part, the text in the cell isn't standardized so the text before / after the names varies both in length and characters, i.e., sometimes there are only two sections separated by hypens and other times they're separated by spaces. The only constants are that the there is always and only one comma in the string (between the Last and First names) and the character just before the last name is a hyphen (-). There are no middle initials of other name elements to consider.
I'm trying to extract just the name portion. I can use MID() to find the comma and go forward. However, I can't figure out how to start at the position of the comma and work backwards to find the 1st hyphen to the left of the comma, which would signify the beginning of the name information. Once I can get to the starting point, I believe I can get the rest.