title: Searching through rows in adjacent column
body: <p>I am currently working on a "warning system" of sorts that will trigger a message box when the constraints are met. For example, if the name "Bob" is found five times in column A, it will check column B to see if any of the other constraints are met, such as more than 5 occurrences of "Call Out". Lastly, if those constraints are met, it will look into column I to see if at least 2 of those occurrences were not an exception ("No"). However, I'm having a hard time deciding how to set it up. I thought about using a series of If statements like so:</p>
  
  <pre><code>Sub WarningSystem()
  Dim SMNameCounter As Integer
  Dim CategoryCounter As Integer
  Dim ExceptionCounter As Integer
  SMNameCounter = Application.WorksheetFunction.CountIf(Range("A1:A200"), "Bob")
  If SMNameCounter = "2" Then
  CategoryCounter = Application.WorksheetFunction.CountIf(Range("B1:B200"), "Call Out")
      If CategoryCounter = "2" Then
          ExceptionCounter = Application.WorksheetFunction.CountIf(Range("I1:I200"), "No")
              If ExceptionCounter = "2" Then
                  MsgBox "Warning! Bob has missed more than (" &amp; CategoryCounter &amp; ") days in a row. One more occurence will result in consequence"
              Else ' Do Nothing / No Trigger
              End If
      Else ' Do Nothing / No Trigger
      End If
  Else ' Do Nothing / No Trigger
  End If
  End Sub
  </code></pre>
  
  <p>This is looking to be extremely tedious and hard to recreate for many variables. Could anyone point me in the right direction as to how I should be setting this up??</p>
  
  <p>Thanks!</p>