Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a given text file, generally speaking, if I want to swap two things, say the word apple with the word orange, and both exist in the document, then I first have to change one of them to something that is not found in the document, change the other, and then change the first one back.

It would be nice to be able to do this in any of the following programs:

  • word
  • Excel
  • Notepad++

Is there a way to do this without the intermediate value?

share|improve this question
How would you select 2 words to swap at the same time? I think beyond that, some VBA might do the trick. – jonsca Nov 30 '11 at 2:21
Well if I were programming it (and I do not want to have to call a separate program to do this) I would parse by the word, and test if it matches one of the ones that I want to swap. If it does, make it the other one. Its easy to program, and far more efficient than my current way in these programs. I would like to avoid a VBA solution if possible. – soandos Nov 30 '11 at 2:36
I'm not sure how you would do it without a separate program or VBA (I'm not sure about the macro capabilities of N++). Good idea at any rate. – jonsca Nov 30 '11 at 2:41
There is not options to do it, or other program where this is possible? – soandos Nov 30 '11 at 2:49

Your Answer


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

Browse other questions tagged or ask your own question.