Ubound(Filter()) Function returns true for partial string matches
<p>Below function returns <code>true</code> for partial matches, how can I modify it to return True only if Whole string is matched.</p>

<p>E.g. if array has <code>AAA</code>, <code>A</code> , <code>BB</code> , <code>B</code></p>

<p>and if I pass <code>AAA</code> it returns True for <code>A</code> as well.</p>

<pre><code>Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean
  IsInArray = (UBound(Filter(arr, stringToBeFound, , vbTextCompare)) &gt; -1)
End Function
</code></pre>

<p>is there a simple modification to this or should I write separate code to implement that ?</p>