Advanced Basics: Word Search & Replace


February 11, 2006 by Jared Goralnick

By now you’ve probably used Search & Replace in Word, and you may have even tried some of the advanced tools within it. However, as an efficiency trainer, I get to see that there’s a huge difference between those who use this tool versus those who have mastered it. The result of mastery? A heck of a lot of frustration and time saved. Maybe even some bragging rights. But enough talk…

Tip 1. Don’t perform a “Replace All.”

Inevitably there’s going to be something that doesn’t fit a pattern. You have two choices, you can refine your search (see below) to a more specific term (which is a good idea, but can be time consuming) or you can take the extra 20 seconds to review each item before replacing it. And, for the record, you don’t need to keep pressing Find and then Replace. By merely pressing Replace (or better yet, pressing R on the keyboard!), Word will move you between each selection and then replace it. A quick glance before each replacement will ensure much more accurate search & replaces.

Tip 2. Refine your searches

I love the More button. If you haven’t clicked on this before, shame on you. I highly encourage to consider how you can refine your searches to make them work better for you. For instance, let’s say you wanted to search for the word “soft” but didn’t want to find instances of the s-o-f-t in “software” or “Microsoft.” This would be a good reason to check Find whole words only. Simiarly, I’m working with a product that has “Hosted” in its title. When the product was renamed, a search for “hosted” would return a lot of incorrect results, but Hosted (with Match Case checked) would be much more likely to produce many more valid results.

Search & Replace Advanced

Tip 3. Now let’s dig a little deeper

Two of my favorite things to search for are ^p and ^l, which are Word’s special codes for paragraph break (hard return) and line break (soft/shift return). I often need to clean up hard returns in an email’s text that I’ve copied and pasted into a document. Other times I’ve writen something in Word but I want a clean way to add html tags. In the case of the latter, I might search for “^p^p” and replace it with “</p>^p^p<p>”. This will perform a search for two successive presses of the <ENTER> key and replace them with the appropriate HTML tags. The additional character codes are available in the Special drop down menu pictured above. Some other neat codes are ^t for tab and ^+ for emdash…

Sometimes I’ll want to search for text that’s formatted one way and alter it to another set of formatting. Granted, I use styles so this is less of an issue, but when working on others’ documents I frequently find centered headings that need to be left aligned, made larger, and become bold. By using the Format drop down I can search for centered text:

  1. Place your cursor in the Find what textbox.
  2. Click on the Format button and select Paragraph
  3. In the Alignment dropdown, choose Centered
  4. Click OK
  5. Note how Centered is now listed under the Find what textbox:

Centered Format

Then I can replace all centered text with Left-Aligned, Bold, 16pt text:

  1. Place your cursor in the Replace with textbox.
  2. Click on the Format button and select Paragraph
  3. In the Alignment dropdown, choose Left
  4. Click on the Format button and select Font
  5. In the Alignment dropdown, choose Left
  6. In the Font Style selector, choose Bold
  7. In the Size selector, choose 16
  8. Click OK
  9. Note how the Replace with formatting has now changed:

Font formatting

This is a fast way to change all the formatting in a long document that was created without styles.

Tip 4. Just be careful

When you use all these formatting commands, just be careful to clear out your textboxes and formatting. Before performing a new search, it’s a good idea to click in each of the textboxes and make sure there are no spaces. Then be sure to click No Formatting in each of the text boxes. You may also need to turn off Match Case or Find whole words only.

Hopefully this’ll make your editing lives just a little easier…

You should really subscribe to Technotheory via Subcribe via email email or rss.



5 Responses to “Advanced Basics: Word Search & Replace”

5 Comments

  1. Joyce McKeown

    Jared,
    I keep meaning to reply to your e-mails, but somehow never do. I do read them and find your Word tips really helpful even for my uses of it.
    Keep up the good work,
    Ms McKeown

  2. Jared Goralnick

    Thanks, “Ms. Mckeown.” Always wonderful to hear from someone who played such a defining role in my introduction to technology. I don’t think I’d have an appreciation for computers “used well” if it weren’t for your excellent guidance back in the day… Thanks for checking in!

  3. rogotenin

    Hello

    I am Lucy, I have found your website while searching for some info at Google. Your site has helped me in a big way.

    Bye

  4. fornetti

    I do not believe this

  5. Szeraax

    Perfectly timed, bro. I finally can remove these out of documents that our translators somehow place them into. now if there was just a character for the end of ceel formatting marks…



Impart Your Theoretically Interesting Wisdom


Your Comments