Forum Discussion
joni_CCD-8244
May 29, 2019Copper Contributor
Reverse name order
I used to do complicated macros years ago, but I either forgot something or the options have changed. I can still do some macros, but not edit a cell. I have a list of names that are "Last name, F...
- May 29, 2019
Hi joni_CCD-8244,
You don't need a macro to do that.
This formula does the trick:
=RIGHT(A1,LEN(A1)-SEARCH(",",A1)-1)&" "&LEFT(A1,SEARCH(",",A1)-1)
You can even do that without using any formula!
By using the https://support.office.com/en-us/article/using-flash-fill-in-excel-3f9bcf1e-db93-4890-94a0-1578341f73f7.
Hope that helps
Twifoo
May 29, 2019Silver Contributor
You may try this formula in B2, assuming the text you want to convert is in A2:
=RIGHT(A2,LEN(A2)-FIND(“,”,A2)+1)&” “&
LEFT(A2,LEN(A2)-FIND(“,”,A2)-1)
=RIGHT(A2,LEN(A2)-FIND(“,”,A2)+1)&” “&
LEFT(A2,LEN(A2)-FIND(“,”,A2)-1)
joni_CCD-8244
May 29, 2019Copper Contributor
Twifoo The formula didn't work. I received a #VALUE! error. I did copy and paste the formula, so I know I did not make a typo.
Another response from another trusted community member suggested using Flash Fill and that worked beautifully.
Thank you for your time
- TwifooMay 29, 2019Silver ContributorI’m glad to know that you achieved your objective although the best response didn’t come from me. What matters most is that you were able to achieve your objective!