title: VBA Textbox value loop vlookup for number of times value is found
body: <p>I am creating a table in my spreadsheet that contains categories, questions and answers for a quiz.
  The user is presented with a form, allowing them to navigate around the workbook easily, this also includes a textbox option, allowing them to search for a phrase if they are unsure what category the question/answer may fall into.</p>
  
  <p>I have generated a vlook up to pull from the table of categories/questions and answers to the user on a different worksheet.
  I have also generated a count, so I am able to identify how many times this work appears across the quiz table.</p>
  
  <p>My problem is I am struggling to develop a loop so that if the key phrase is found 6 times for example, i want 6 questions and answers to be listed to the user. Currently it is only pulling the final time it is found.</p>
  
  <p>My current code includes the following:</p>
  
  <pre><code>Private Sub CommandButton1_Click()
      If Len(search_text) = 0 Then
          MsgBox "Please enter a key word to search for!", vbCritical
      End If
  
      Dim wordCount As Integer
      wordCount = Application.WorksheetFunction.CountIf(Sheet1.Range("A2:c600"), "*" &amp; search_text.Value &amp; "*")
      'Else: wordCount = WorksheetFunction.CountIf(Sheet1.Range("A2:c600"), search_text.Value)
  
      If wordCount = 0 Then
          MsgBox "No match found"
      Else
          Sheet2.Range("a7").Value = WorksheetFunction.VLookup("*" &amp; search_text.Value &amp; "*", Sheet1.Range("A2:c600"), 3, False)
          Sheet2.Range("b7") = wordCount
      End If
  
  End Sub
  </code></pre>
  
  <p>Any advice on implementing a loop and to allow the question/answer to be printed one after another would be very much appreciated.
  I have read many other question pages about this and none seem to match what I am trying to do.</p>
  
  <p>Many thanks in advance</p>