Assuming a 1-based array, you could use:
though I suspect it would be as fast if not faster to simply iterate every element rather than using worksheet functions on arrays.Code:for n = lbound(correlmatrix, 2) to ubound(correlmatrix, 2) varmatch = application.match(avar, application.index(correlmatrix, 0, n)) if not iserror(varmatch) then msgbox "x=" & varmatch & "; y=" & n end if next n




Reply With Quote
Bookmarks