Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have a Word-document and want 2 words next to each other to change places with oneanother is that possible with some function or logic in Word?

share|improve this question

5 Answers 5

up vote 6 down vote accepted

If the words are next to each other,

Turn on "Use Wildcards"

Find: (1stword) (2ndword)

Replace: \2 \1

share|improve this answer

Not sure I understand your question but you can use search and replace like this:

  1. Replace the first word with something random
  2. Replace the second word with the first word
  3. Replace the random word with the second word
share|improve this answer

If you want some VBA to swap two adjacent words around, this will do it:

Sub SwapWords()
    'Clear Selection
    Selection.SetRange Start:=Selection.Start, End:=Selection.Start
    'Expand Selection to word under cursor
    Selection.Expand
    'Cut word
    Selection.Cut
    'Move one word right
    Selection.MoveRight Unit:=wdWord
    'Paste word
    Selection.Paste
End Sub
share|improve this answer

Random words are not needed if you have two exact word separated by a single space (or some similar CONSISTENT layout)

Use Find and replace to search for word1 word2 and replace with word2 word1

share|improve this answer

I have just discovered myself, this is easiest done in Microsoft Excel:

  1. Open an Excel workbook and paste the data to be "swapped" into the spreadsheet.
  2. First thing is to make sure you have a blank column next to where the split will happen, so insert columns as necessary.
  3. Highlight the column that you want to separate.
  4. From the Data Group tab, select Text to Columns, the "Convert Text to Columns Wizard" will open up.
  5. Excel will determine the Original Data Type for you (if each set of data has the same number of characters, fixed will be selected. If not, delimited will be.) Click next
  6. If your current data is separated by one of the Delimiters listed (normally space), select that and click next.
  7. Select the type of Column Data Format (text, number, etc.), click finish.
  8. It may ask you if you want to replace the contents of the destination cells-click "ok"

If you don't want to leave it in an Excel Spreadsheet, you can copy and paste (either as text or table) into a Word document.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.5.22.2603\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Super User works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscrip"], "copyright__copyright__copyright": ["e of Column Data Format (text, number, etc.), click finish.\n  8. It may ask you if you want to replace the contents of the destination cells-click \"ok\"\n\nIf you don't want to leave it in an Excel Spreadsheet, you can copy and paste (either as text or table) into a Word document.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}