I have an existing formula that work super great at stripping literal crap from a report we get and gives me the name. I am wondering if I can take this to the next level and now take the last name off the result of that formula and then place it in the front. IE, using my name you would get Gerald W Maxwell as a result. And I'd like to get Maxwell, Gerald W (not punctuation).
Here's a name example from the report, and the formula as well:
Name Example: Chat Operator Performance by Operator by Day for 1234567_1234567890_Gerald W_Maxwell
Formula: =IFERROR(IF(RIGHT($B1,6)="EXEMPT",LEFT(SUBSTITUTE(RIGHT($B1,LEN($B1)-68),"_"," "),LEN(SUBSTITUTE(RIGHT($B1,LEN($B1)-68),"_"," "))-7),SUBSTITUTE(RIGHT($B1,LEN($B1)-68),"_"," ")),"DELETE")
So, if you place that formula in cell A1 and the name example you will get Gerald W Maxwell. This is great, I wanna know if we can put the last name first based on that.
Before I post this, let me break down what the formula is doing first. At it's heart is RIGHT($B1,LEN($B1)-68) and this strips the raw name from from the fluff. This is then wrapped with a substitute function to get rid of any underscores from the name. The next wrapper is an If statement looking for the word "EXEMPT" (because the people that create this report thought it would be a nice feature...), and lastly, complete the wrapping with a bow... an IFERROR statement that gives you a nice "DELETE". This is so I can run a macro to delete the rows of stuff I don't need from the data table.
What is giving me the most grief is that I have people with a first and last name, some have a first, middle and last, and a few special individuals with first, middle, surname and last name.
If it can't be done, I can code this to do text to columns and re-concatenate on the other side of that, but if I can get it into a single line formula, I can save myself the hassle of the coding.