+ Reply to Thread
Results 1 to 5 of 5

Finding a value in a table where both row and column are variable

  1. #1
    Registered User
    Join Date
    04-06-2013
    Location
    Washington state
    MS-Off Ver
    Excel 2007
    Posts
    2

    Finding a value in a table where both row and column are variable

    I'm simply trying to MATCH data on one sheet to data in an array on another sheet.

    =MATCH(O6,'2PercentPayTable'!B12:P12, 1) \\ This formula works correctly (except that it gives me an error if I try to use -1, not sure why).

    Since the row I'm searching is based on a value and is not always row 12, I created fields in columns q and r to replace "B12" and "P12". The value in q6 is "B12".

    =MATCH(O6,"'2PercentPayTable'!"& INDIRECT("q6")&":"& INDIRECT("r6"), 1) \\ returns a #VALUE! error.

    When I evaluate it everything seems to come out right except that the last step before the error has quotation marks around the reference to the array.

    I've been trying to figure out how to get any kind of formula into the basic expression "sheetname!cell1:cell2", and while there are examples on the forum of using a formula for "sheetname", I can't find any that directly tell me how to replace "cell1" and "cell2" with a formula.

    Any idea? Thanks.
    Mike
    Last edited by jungx006; 04-06-2013 at 09:47 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Finding a value in a table where both row and column are variable

    request deleted
    Last edited by protonLeah; 04-07-2013 at 12:47 AM.
    Ben Van Johnson

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding a value in a table where both row and column are variable

    Try it like this...

    =MATCH(O6,INDIRECT("'2PercentPayTable'!"&Q6&":"&R6),1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    04-06-2013
    Location
    Washington state
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Finding a value in a table where both row and column are variable

    That did it! Thank you Tony!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding a value in a table where both row and column are variable

    You're welcome. Thanks for the feedback!

+ 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