Skip to main content

chat1

Function OnlyContainsItems(arr() As Variant, item1 As Variant, item2 As Variant) As Boolean
    Dim item As Variant
    For Each item In arr
        If item <> item1 And item <> item2 Then
            OnlyContainsItems = False
            Exit Function
        End If
    Next item
    OnlyContainsItems = True
End Function