+ Reply to Thread
Results 1 to 7 of 7

Alternative to Index/Mathc for 2D Array

  1. #1
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Alternative to Index/Mathc for 2D Array

    Hi

    In a 3 column 2D array I need to lookup value in second Column and return the 3rd column value. this is done with VLOOKUP

    and I know the Index/Match is not gonna work on 2D array

    So any workaround to lookup 2nd column value and return the adjacent value of first column?

    Help would be greatly appreciated.

    Best Regards
    Imran Bhatti
    Teach me Excel VBA

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Alternative to Index/Mathc for 2D Array

    I know the Index/Match is not gonna work on 2D array
    Should work with the restriction.

    BTW
    How are you populating 3 columns 2D array?
    If you think it is faster to use function with array than a worksheet, it is completely wrong.

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Alternative to Index/Mathc for 2D Array

    Yes I was thinking it would speedup the operation.

    2D array is populated like
    myArray=sheet1.range("A2:C20").value

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Alternative to Index/Mathc for 2D Array

    Using function with an array has restrictions.

    See an example,
    https://www.ozgrid.com/forum/forum/h...of-range-error

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Alternative to Index/Mathc for 2D Array

    I'd put my mortgage on a simple loop being quicker (unless the array is sorted)

  6. #6
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Alternative to Index/Mathc for 2D Array

    Quote Originally Posted by jindon View Post
    Using function with an array has restrictions.

    See an example,
    https://www.ozgrid.com/forum/forum/h...of-range-error
    I can see a long discussion.Will go through it.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Alternative to Index/Mathc for 2D Array

    Here's an extreme example, but you can see the speeding difference.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 12-13-2017, 10:08 AM
  2. [SOLVED] Alternative to using an array in an Index or similar function?
    By aquixano in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2017, 04:57 PM
  3. [SOLVED] Alternative to INDEX MATCH Array Formula to Populate Teaching Groups?
    By AliGW in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2015, 01:58 PM
  4. Replies: 5
    Last Post: 12-02-2015, 05:23 AM
  5. VBA Alternative to array index match
    By Helgard25 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-14-2015, 09:01 AM
  6. UDF Lookup function as an alternative to array functions & match/index
    By Andrew_Harris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 09:34 PM
  7. edit macro to mathc entire cell contents
    By nis75p06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2005, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1