Wednesday, 26 September 2012

VBA: IsInArray - Find a value in array items

The below script will be used to get to know whether a particular item exists in a array or not. Instead of looping this would be faster.

1 comment:

  1. thanks, used your code, works great, except if the value happens to be at the end of the array. I added: + "," to the word list so that the next comma position can be found at the end of the word list.

    wordList = Join(arr, ",")+ ","