What is the syntax to return a filtered array?

Filter(inputStrings, value, include, compare)
'inputstrings - array to be searched; mandatory parameter
'value - search value; mandatory
'include - boolean whether/or not to return the substrings that include/exclude; optional parameter
'compare - binary or textual; optional parameter
‘example
Dim guestList, BlacheFamily As Variant
guestList = Array("Steven Blache", "Melissa Weather", "Kerry Stilt", "Michael Blache", "Karen Blache")
BlacheFamily = Filter(guestList, "Blache")

 
For Each person In BlacheFamily
   MsgBox (person)
Next

‘output is three msgboxes with “Steven Blache” “Michael Blache” and “Karen Blache”
Advertisements