Hello Excelforum!

I am trying to write a function that searches an array for a value and returns the index(es) of where the value is found.

Say I have an array, arrAccNos() with elements (1, 2, 3, Something, 1) and I want to find out if the array contains the value 1 as well as where the value 1 was found in the array. The function should operate like this:

FindInArray(arrAccNos, 1) would return "1,5" as a string. (no quotes)
FindInArray(arrAccNos, something) would return "4" as a string. (no quotes)
FindInArray(arrAccNos, SoMeTHinG) would return "4" as a string. (no quotes)
FindInArray(arrAccNos, somethingelse) would return "errNotFound" as a string. (no quotes)

Thank you for your help!