ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   USing Match on 2D array (https://www.excelbanter.com/excel-programming/386284-re-using-match-2d-array.html)

Tom Ogilvy

USing Match on 2D array
 
Technique demo'd from the immediate window:

v = Evaluate("{1,""A"";2,""B"";3,""C"";4,""D""}")
? v(1,1)
1
? v(1,2)
A
? Application.Match("C",Application.Index(v,0,2),0)
3
--
Regards,
Tom Ogilvy


"ExcelMonkey" wrote:

Can someone please remind me how to use match on a 2d array ("OrigViewNames")
if i am looking to return the position of a value (x) in the second column of
the array.

This does not work:
Application.Match(x, OrigViewNames, 0)

What do I have to put after the OrigViewNames to indicate column 2.

Thanks

EM



All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com