I want to split a cell, reorder the pieces and recombine. For example:
| name | reordered name |
| Page,Larry | Larry Page |
| Brin,Sergey | Sergey Brin |
I know that =SPLIT(A2, ",") will split the values into the next two columns and I know that I can concatenate values with =CONCATENATE(A2, " ", B2).
How do I bring these things together in a single formula?
Can I access the values from SPLIT and reorder them?
I know I can do =CONCATENATE(SPLIT(A2)) (but obviously that is stupid).
In Ruby I would just do something like:
def reorder_name(cell)
names = cell.split(",")
"#{names[1]} #{names[0]}"
end