I'm working on making an existing macro-enabled spreadsheet functional on Excel for Mac 2011.
I have a function (Source) that searches arrays for a specified value:
Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean
IsInArray = (UBound(Filter(arr, stringToBeFound)) > -1)
End Function
It works perfectly in Excel 2013, but on Excel for Mac 2011, I receive the error:
Runtime error '9': Subscript out of range
I broke it apart and found that the UBound call is what's causing the error.
I'd like to change as little as possible for maintainability. How can I fix this error for the Mac version?
Thanks in advance for any replies!
Solution: See StackOverflow
Bookmarks