3 Quick Methods to Find Text in Your Word Tables Only

In this article, we are glad to show you 3 quick ways to find specific text in your Word tables only.

Utilizing the “Find and Replace”, a built-in function in Word, you can search for and find a specific text in a long document. As you see, this is based on the entire document. How about we limit the searching range to Word tables only? Read on to see details.Find Text in Your Word Tables Only

Method 1: Find Text in Selection

  1. First of all, manually select one or more tables in document.
  2. Then click drop-down button next to “Find” command under “Home” tab.
  3. Choose “Advanced Find” to open “Find and Replace” dialog box.
  4. Enter finding text in “Find what” text box.
  5. Click “Find In” tab and choose “Current Selection”.  Enter Text->Click "Find In"->Choose "Current Selection"

Word will find text in your selection only.

Method 2: Find Text in a Table

Besides the usual way, you can choose to run macro to do more customized tasks.

  1. First off, put cursor inside a table where you want to find text.
  2. Then press “Alt+ F11” to open VBA editor.
  3. Click “Normal” on the left column.
  4. Then click “Insert” and choose “Module”.Click "Normal"->Click "Insert"->Click "Module"
  5. Next double click the module to open it.
  6. Paste following codes into module:
Sub FindInATable()
  Dim strText As String
 
  strText = InputBox("Enter finding text here: ")
 
  Application.ScreenUpdating = False
  If Selection.Information(wdWithInTable) = True Then
    With Selection.Tables(1).Range
      With .Find
        .ClearFormatting
        .Text = strText
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute
      End With
      Do While .Find.Found
        .Cells(1).Shading.BackgroundPatternColorIndex = wdBrightGreen
        On Error GoTo handler
        .Collapse wdCollapseEnd
        .Find.Execute
      Loop
    End With
  Else
    MsgBox ("Put cursor inside a table first.")
    Exit Sub
  End If
  handler: Exit Sub
  Application.ScreenUpdating = True
End Sub
  1. Lastly, click “Run”. Enter a text inside the input box and click “OK” to proceed.Paste Codes->Click "Run"Enter Finding Text ->Click "OK"

Method 3: Find Text in All Tables in a Document

  1. First and foremost, repeat steps in method 2 to install and run a macro.
  2. Next replace that macro with this one:
Sub FindTextsInAllTables()
  Dim strText As String
 
  strText = InputBox("Enter finding text here: ")
 
  Application.ScreenUpdating = False
  With Selection
    .HomeKey Unit:=wdStory
    With Selection.Find
      .ClearFormatting
      .Text = strText
      .Forward = True
      .Wrap = wdFindStop
      .Format = False
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
      .Execute
    End With
    Do While .Find.Found = True
      If .Information(wdWithInTable) = True Then
        .Cells(1).Shading.BackgroundPatternColorIndex = wdBrightGreen
      End If
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
  Application.ScreenUpdating = True
End Sub
  1. Similarly, type searching text inside the input box. And click “OK” to proceed.

Rescue Your Data in Time

Once you get compromised data, keep in mind that they are recoverable. So never give up before trying. Under such circumstances, you need to check your latest backup, if any. There is a good chance to have some of your data back. Besides, you can always resort to doc fix tool to recover data.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including damaged xls and pdf repair software products. For more information visit www.datanumen.com

2 responses to “3 Quick Methods to Find Text in Your Word Tables Only”

  1. Wow, awesome blog format! How lengthy have you been blogging for?
    you make running a blog glance easy. The entire glance of your website is excellent, let alone the content material!
    You can see similar here sklep online

  2. i have implemented the above suggestions but now am met with the following computer error:

    error file “system32” not found

    what do i do

Leave a Reply

Your email address will not be published. Required fields are marked *