title: Wildcard search in array
body: <p>I have an array containing a bunch of common terms used to denote that the field is awaiting a PO. Then I have a loop to go backwards through a large column of data deleting any rows where the value in the cell doesn't match any of the terms in the array. To do this I use a function (which I found online) to test if the value exists in the array.</p>
  
  <p>So far so good, as long as the value in the cell matches a value in the array exactly. Where it goes wrong is if a cell contains a slight variation on one of the common terms (ie. "TBC - will follow later" or even just "TBC " instead of "TBC" exactly)</p>
  
  <p>I need a way to take the value in the cell and do a wildcard search against the values in the array. I won't paste all my code (it's a mid-development mess right now), but if we can get this below to work I can apply it.</p>
  
  <pre><code>Sub TestFilterArray()
  MyArray = Array("tbc", "awaiting po", "po to follow")
  If IsInArray("tbc xyz", MyArray) = False Then
      MsgBox "No! Item is not in the array"
  Else
      MsgBox "Yes! Item is in the array"
  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>This currently returns "No!..." for "tbc xyz" not being in the array but I'd like it to return "Yes!..." for "tbc*" being there if that makes sense.</p>
  
  <p>Any help gratefully appreciated.</p>