Forum Discussion
Reverse name order
- 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
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
The formula gave me a #VALUE! error (and I copied and pasted your formula); HOWEVER, your suggestion to use Flash Fill worked beautifully. Thank you so much.
- Haytham AmairahMay 29, 2019Silver Contributor
It seems that the names in your original data are not separated by a comma+space just space??
If so, try this formula instead:
=RIGHT(A1,LEN(A1)-SEARCH(" ",A1))&" "&LEFT(A1,SEARCH(" ",A1)-1)
Hope that helps
- nauwelaertsevelienJan 28, 2020Copper Contributor
Hi,
I am trying to use your formula as well but the names I use are a bit more complex.
For the name: de Bakker Alexandra
I receive: Bakker Alexandra de with your formula.
I want to obtain Alexandra de Bakker
How can I do this?
Thank you for your help.
- Haytham AmairahJan 30, 2020Silver Contributor
Hi,
In this case, try this formula:
=IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1>2,
RIGHT(A1,LEN(A1)-SEARCH(" ",A1,SEARCH(" ",A1)+1))&" "&LEFT(A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)-1),
RIGHT(A1,LEN(A1)-SEARCH(" ",A1))&" "&LEFT(A1,SEARCH(" ",A1)-1))Hope that helps