505.369.1650 [email protected]

Determine if a value is in a VBA array

This function will return a True if a particular value is found in an array.  It works with one-dimension arrays only. For example, if astrCity is an array, you could check for the value Chicago like this: If InArray(astrCity, “Chicago”) Then ‘ Run logic here....

Find duplicates in a VBA array

This VBA function looks for duplicate values in an array.  If it finds some, it produces a list of the duplicated values.  It is a good example of how to loop through an array. The argument needs to be an array.  Nulls in the array are ignored by the logic, and the...