Swap first and last name
-
- Posts: 1
- Joined: Wed Jul 28, 2021 5:49 am
Swap first and last name
In my spreadsheet, I have a column of names written as last name then a space then a first name and sometimes another space then middle initial. Is there a way to put the last names on the other side of the first name and middle initial so it reads as first name, space, middle initial, space, last name?
Open Office 4.1.10 on Windows 10
Re: Reversal of text in a column
One way of doing it - with the name in A1, put this formula in B1;
The attached file contains some extra columns that may help you understand the whole formula if necessary.
Code: Select all
=TRIM(MID(A1;SEARCH(" ";A1)+1;LEN(A1)))&" "&LEFT(A1;SEARCH(" ";A1)-1)
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers