title: Finding if a string is in a 2 dimensional VBA Excel array
body: <p>I have a great function that I use all of the time for a 1 dimensional Excel VBA array that checks if a string is in an array:</p>
  
  <pre><code>Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean
  
      IsInArray = (UBound(Filter(arr(), stringToBeFound)) &gt; -1)
  
  End Function
  </code></pre>
  
  <p>Unfortunately it does not work when using it to check for a 2 dimensional array, like I have here:</p>
  
  <pre><code>Sub new_idea_filter()
  
  home_sheet = ActiveSheet.Name
  
  c = 1
  
  Dim myfilters(1 To 4, 1 To 5000)
  
  
  myfilters(1, 4) = "Test"
  
  If IsInArray("Test", myfilters()) = True Then
      killer = True
  End If
  
  
  
  End Sub
  
  Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean
  
      IsInArray = (UBound(Filter(arr(), stringToBeFound)) &gt; -1)
  
  End Function
  </code></pre>
  
  <p>It keeps erroring out in the function saying subscript out of range, anyone have a thought how I can check if a string is in the 2 dimensional array?</p>