+ Reply to Thread
Results 1 to 3 of 3

Search a multiple dimensional array

  1. #1
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Search a multiple dimensional array

    So I'm really stuck on this one. So I have a multi dimentional array of numbers and they are random I need to be able to search for a given number where ever it is. It could be in any row or column. I know I need to use an array formula but can't quite get it to work.

    In this example I am trying to get index() to reference 200.

    In the end I will also need to return all the values below the 200 but that is easy if I crack the referencing as you can just add +1 to the row.

    I've managed to get it working if I know which column the value will be in but it could be in any column or row which is when the problem comes in.

    Matrix.xls
    Last edited by darknation144; 02-21-2012 at 06:26 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Search an multiple dimention array for a given value

    Hi Darknation,

    If you want to get the address where I4 is found in your table, you could use:

    =ADDRESS(SUMPRODUCT((A1:D6=I4)*(ROW(A1:D6))),SUMPRODUCT((A1:D6=I4)*(COLUMN(A1:D6))))

    If you just want the row or column you can separate those out to:

    Row: SUMPRODUCT((A1:D6=I4)*(ROW(A1:D6)))

    Column: SUMPRODUCT((A1:D6=I4)*(COLUMN(A1:D6)))

  3. #3
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Search a multiple dimensional array

    Deleted Post
    Last edited by darknation144; 02-21-2012 at 06:26 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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