Function isexist(value, arry) As Boolean Dim i As Integer For i = 1 To UBound(arry) If value = arry(i) Then isexist = True Exit Function End If Next isexist = FalseEnd Function