function to check array includes in vba code example
Example 1: vba array contains
Dim YourArray
YourArray = Array("a", "b", "c")
Debug.Print (UBound(Filter(YourArray, "c")) > -1) ' True
Example 2: vba test if array
Dim MyArray(1 To 5) As Integer, YourArray, MyCheck ' Declare array variables.
YourArray = Array(1, 2, 3) ' Use Array function.
MyCheck = IsArray(MyArray) ' Returns True.
MyCheck = IsArray(YourArray) ' Returns True.