spiros

  • Administrator
  • Hero Member
  • *****
    • Posts: 858907
    • Gender:Male
  • point d’amour
Swap the order of two words in an Excel cell

Lets suppose you have in Cell A1 Smith John and you want to make it John Smith.

Try this (if you have a US/UK locale):

Code: [Select]
=RIGHT(A1, LEN(A1)- FIND(" ",A1))&" "& LEFT(A1, FIND(" ",A1)-1)
Or this (if you have a Greek locale):

Code: [Select]
=RIGHT(A1; LEN(A1)- FIND(" ";A1))&" "& LEFT(A1; FIND(" ";A1)-1)
If you copy and paste often text from functions, instead of going the roundabout way for pasting values (Ctrl+Alt+V then twice down arrow, then Enter), you can do the following (for Excel 2010 and higher):

Right click the Quick Access Toolbar and select Customize Quick Access Toolbar.
In the resulting dialog at top select Commands Not On The Ribbon
Scroll down to Paste Values, click the Add button and then OK.
 
Now you have a Paste Value on the Quick Access Toolbar. If you press Alt, you will see a number next to the new icon. Press ALT+the number to paste values.

« Last Edit: 04 Nov, 2014, 20:47:12 by spiros »
Look up Multiple Greek, Ancient Greek and Latin dictionaries — Οὕτω τι βαθὺ καὶ μυστηριῶδες ἡ σιγὴ καὶ νηφάλιον, ἡ δὲ μέθη λάλον· ἄνουν γὰρ καὶ ὀλιγόφρον, διὰ τοῦτο καὶ πολύφωνον (Plutarch)


 

Search Tools