+ Reply to Thread
Results 1 to 4 of 4

When using match function can your lookup array be multiple rows and columns

  1. #1
    Registered User
    Join Date
    07-02-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    12

    When using match function can your lookup array be multiple rows and columns

    or is it restricted such that the lookup array can only be one column ie: A:A when finding row number or one row ie: 1:1 when finding column number

    I'm using the index and match functions in combination and I want the lookup array in the match functions to be the same as the lookup array in the index function.


    IE: lets say I want to search vertically for a list of work activity codes and I want to search horizontally for various metrics such as work accomplished, actual hours spent and so on.

    but I don't want to always be restricted to having the raw data I'm searching in the same format where activity codes are always column B and the status/metrics on those activity codes is always row 4.



    I want to be able to search an entire array of multiple rows and columns (or an entire spreadsheet) for a specific reference and have it return the row number that reference is in.

    then I want to be able to search an entire array of multiple rows and columns (or an entire spreadsheet) for a another different specific reference, like hours spent, and then return the column number that reference is in

    then i want to have the value returned that occurs at the intersection of that row and column either using the index function or some other function


    I tried something like:

    =Index(A1:AR90, Match(AC312, A1:AR90, 0), Match("Hours Spent", A1:AR90, 0))

    But it doesn't work.

    However If i have

    =Index(A1:AR90, Match("ITXRP", C:C, 0), Match("Hours Spent", 1:1, 0))

    It works just fine.

    However this restricts me to always having to make sure the raw data export I get is in the format where Activity Code is in column C and the metrics headers are in Row 2.


    I want the Functions to work whether I have the activity codes listed in Column M and the headers in row8, or activity codes in column E and Headers in row 4 etc.- to still work regardless of what column my activity codes are in and regardless of what row the metrics headers are in


    I thought maybe a nested match like Match("IXRTP", then for array using another match that would return the column, but that match would have to have a specific row selected and you could use another nested match to get the row but then you would have to select a specific column to search.

    I couldn't get it to work and I don't think that would work either because it seems to me it would run into a circular logic issue







    Is there a function that will search an entire array of multiple rows and columns (A1:AC90) or an entire sheet and return a specific number for the row number and do the same for the column number such that it could be used in the index function or some other function

    Thanks for any input
    Last edited by heyzeus17; 09-30-2011 at 12:05 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: When using match function can your lookup array be multiple rows and columns

    See attatchment

    You could search on the combination of multiple columns or rows
    Attached Files Attached Files
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  3. #3
    Registered User
    Join Date
    07-02-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: When using match function can your lookup array be multiple rows and columns

    is there a way to do that without having to concatenate or separate the columns/type in the multiple columns separately

    Essentially is it possible to be like

    "Hey excel search the entire spreadsheet for this unique value and tell me what row it is in"

    "now search the entire spreadsheet for this unique value and tell me what column it is in"

    now using the index function (or some other function) tell me what the value is at the intersection of the above row and column

    I updated your spreadsheet with what i'm trying to get to work but am having trouble with
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: When using match function can your lookup array be multiple rows and columns

    see attatchment

    use =INDEX(Data,H3,H6) to pick "hello" or

    =INDEX(Data,SMALL(IF(Data=F2,ROW(Data)),1),SMALL(IF(Data=F5,COLUMN(Data)),1)) confirm with Ctrl+Shift+Enter

    is it help?
    Attached Files Attached Files
    Last edited by Azam Ali; 09-30-2011 at 02:53 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