Learnit Training


3. Search and replace (basic and continued)

The search option allows us to search within the document for a specific text, such as a word or phrase.
With the replace option, we can not only find a text, but also replace it with another text.
You can find these options on the Home tab In The editGroup:

We first look at how we can find a word.

  • Open the file: Station Haarlem. docx
  • Click on On the tab Start In the group Edit.
    You can also use the shortcut [Ctrl + F] Use.
    The task pane Navigation Appears.
  • Type in the search box (document Search): drive
    As you type, everything with ' drive ' is highlighted in the document: ' Station ', ' Station ' and also in words like ' train station ' and ' stations '.
  • The search results are also listed under the Search box .
    Scroll through the results by clicking on them.

Options

We can also search more specifically with search options. We will pop a few options here.

  • Click the Magnifier Or list arrow behind the Search box , and then click Options...

  • The following window appears:


    The options Mark All And Incremental Search are already checked.
    Then check Match case And Whole word To.
    Click the button OK.
  • We now search for the word ' station ' again. Type in the search box: Drive
    Now you see that the search results only contain the exact word ' drive '. ' Drive ' with a capital letter and not-whole such as ' station ' and ' stationsrestauratie ' are not present in the search results.
  • Click the Cross To make it Navigation pane.

Replaced

We can also have the found words replaced with another word.

  • On the homeTab, editthe group:
  • Click on
    You can also use the shortcut [Ctrl + H] Use.
  • The find and Replace task pane appears.
    Type in the Search forbox: Train station
  • Type in the Replace withbox: drive
  • Click the button:
    The first found result of ' train station ' has been replaced by ' station '
  • The word ' train station ' is more common in the document. We are going to replace them all.
    Click the button:
    All results of the search term ' train station ' have now been replaced by ' station '.
  • Click Cancel to close the Find and Replace task pane.

Remove double spaces with replace

If you write a lot of texts it is often that you use too many spaces while typing. Those double spaces are quickly overlooked. We can remove these with the option replace at once.

Also in our document Station Haarlem There are too many spaces. We will remove it:

  • Click on On the tab Start In the group Edit.
  • The find and Replace task pane appears. In the Search for box, Type a space twice.
  • In the Replace with box, Type a space once.
  • Click the button:
    All double spaces are now replaced by a single space.
  • Click Cancel to close the Find and Replace task pane.

Find and replace with wildcard characters (continued)

An advanced search option is search using wildcard characters. You can use a wildcard character if you don't know the spelling of a word or to more broadly define your search. Here are some common wildcard characters:

  • Click on On the tab Start In the group Edit.
    The task pane Navigation Appears.
  • Click the Magnifier Or list arrow behind the Search box , and then click Options...

  • The following window appears:


    Check the option Using wildcard characters To.
    Click the button OK.
  • Type in the search box: Track * n
    The wildcard character * represents any string of characters. Word now includes ' railway ', ' railway station ' and ' railways '.
  • Type in the search box: 184?
    The wildcard character? Represents one random character. Word now finds the years ' 1842 ' and ' 1844 '.
  • Type in the search box: e @ n
    The @ wildcard character represents zero or more occurrences of the preceding character. Word now finds ' en ' and ' one '.
  • Last we type in the search box: [AR]?? Terdam
    The [] wildcard character is one of the characters between the brackets. Word now finds ' Amsterdam ' and ' Rotterdam '.

We have now finished the exercise.