title: Modify Loop to include 3 strings
body: <p>I have the following code I use to go through a sheet and parse the information onto separate sheets based on the string [Start].</p>
  <pre><code>Private Sub CommandButton7_Click()
  
  Application.ScreenUpdating = False
  
  Dim i As Long, rFind As Range, rFind1 As Range, rFind2 As Range, rFind3 As Range, rFind4 As Range, ws As Worksheet, s As String, s1 As String, s2 As String
  
      s = &quot;[Start]&quot;
  
      With Sheets(&quot;Full History File&quot;).Columns(1)
          
          Set rFind3 = .Find(What:=&quot;[HistoryEnd]&quot;, LookAt:=xlPart, MatchCase:=False, SearchFormat:=False)
          Set rFind = .Cells(Rows.Count, 1)
          
          For i = 1 To WorksheetFunction.CountIf(.Cells, &quot;*&quot; &amp; s &amp; &quot;*&quot;)
          
          Set rFind = .Find(What:=s, After:=rFind, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
          
              If Not rFind Is Nothing Then
              
                  Set rFind1 = .Find(What:=s, After:=rFind)
                  Set ws = Worksheets.Add(After:=Sheets(Sheets.Count))
                  ws.Name = &quot;Blasted &quot; &amp; i
              
                  If i = WorksheetFunction.CountIf(.Cells, &quot;*&quot; &amp; s &amp; &quot;*&quot;) Then
                  
                      Set rFind1 = rFind2.Offset(1)
              
                  End If
              
                  Range(rFind, rFind1.Offset(-1)).Copy ws.Range(&quot;A1&quot;)
          
              End If
      
          Next i
  
      End With
  
      Sheets(&quot;Blast Summary Sheet&quot;).Select
  
      SheetNames
  
      CommandButton6.Visible = True
      
      Application.ScreenUpdating = True
      
  End Sub
  </code></pre>
  <p>My problem is that the information I am working through has changed and I need to adapt the code to do the following:</p>
  <ol>
  <li>Search for the string [TrainingModeChanged]</li>
  <li>If not found search for the string [TrainingMode]</li>
  <li>If not found search for the string [Start]</li>
  </ol>
  <p>Once any of the strings are found create the new sheet Blasted with the number and copy the information between the found string up until the next found string which could be either one of the 3 above.</p>
  <p>All help in modify the code to do this would be helpfull thanks</p>