+ Reply to Thread
Results 1 to 9 of 9

Referencing a second Criteria within INDEX and MATCH

Hybrid View

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    16

    Referencing a second Criteria within INDEX and MATCH

    Hello,

    I've been looking at this problem for too long, and can't seem to find the correct way to solve it.
    I've attached a sheet with the problem.

    I have one sheet which summarises the status of documents in another sheet.
    I'm using INDEX and MATCH to return the correct Document title and info.
    But I need to offset/countif/INDEX MATCH again or something to get to reference the latest revision status of the document.

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,243

    Re: Referencing a second Criteria within INDEX and MATCH

    Hi Tim,

    You first need to get rid of your Merge cells in the table and repeat all cell data. Merge cells keep you from dealing with your data as a real table.

    I did that and created a Helper column (so I didn't need array formulas) to put two columns together. Then a Pivot and finally a column next to the pivot to return what I think you wanted.
    Why a pivot you ask? I know that a pivot table can return the Max value of version for each column 2. See the attached to see if it helps.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-07-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Referencing a second Criteria within INDEX and MATCH

    Thanks Marv.

    Never used Pivot tables before, so took a while to get it.
    I'm still sure there is a way to Offset the lookup values some how.

    Tim

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

    Re: Referencing a second Criteria within INDEX and MATCH

    Is the latest revision status found in column F that corresponds to the max date in column E for that particular document?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    02-07-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Referencing a second Criteria within INDEX and MATCH

    Yepp Tony, that's right.

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

    Re: Referencing a second Criteria within INDEX and MATCH

    Try this...

    Enter this formula in cell F3 of the Summary sheet and copy down:

    =LOOKUP(2,1/((ISNUMBER(FIND(LEFT(INDEX(Input!A$2:A$28,MATCH(B3,Input!B$2:B$28,0)),FIND("-",INDEX(Input!A$2:A$28,MATCH(B3,Input!B$2:B$28,0)))),Input!A$2:A$28)))/(Input!E$2:E$28<>"")),Input!F$2:F$28)

    You can shorten that a bit by using named ranges.

    Name: Item
    Refers to: =Input!$A$2:$A$28

    Name: Doc
    Refers to: =Input!$B$2:$B$28

    Name: Dates
    Refers to: =Input!$E$2:$E$28

    Name: Status
    Refers to: =Input!$F$2:$F$28

    Then the formula becomes:

    =LOOKUP(2,1/((ISNUMBER(FIND(LEFT(INDEX(Item,MATCH(B3,Doc,0)),FIND("-",INDEX(Item,MATCH(B3,Doc,0)))),Item)))/(Dates<>"")),Status)

  7. #7
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Referencing a second Criteria within INDEX and MATCH

    One approach which encourages complete data association to simplify downstream calculations

    In Input,
    1. Complete the row-wise data association for the document number column and document title column, which have gaps. This simple formulae setup will "fill-from-above" and do the task in 2 seconds. Complete data association will simplify downstream calculations

    In I2: =B2
    Copy across to J2

    In I3: =IF(B3="",I2,B3)
    Copy across to J3, fill down to the last row of source data

    Then in Summary,
    As the Latest date is simply the "Max" date ...
    To extract latest Rev
    Put this in D3, and array enter the formula, ie press CTRL+SHIFT+ENTER to confirm the formula:
    =INDEX(Input!$D$2:$D$28,MATCH(MAX(IF((Input!$I$2:$I$28=$B3)*(Input!$J$2:$J$28=$C3),Input!$E$2:$E$28)),IF((Input!$I$2:$I$28=$B3)*(Input!$J$2:$J$28=$C3),Input!$E$2:$E$28),0))
    Copy down

    Likewise, to extract latest Status,
    Put in F3, and array enter the formula, ie press CTRL+SHIFT+ENTER to confirm the formula:
    =INDEX(Input!$F$2:$F$28,MATCH(MAX(IF((Input!$I$2:$I$28=$B3)*(Input!$J$2:$J$28=$C3),Input!$E$2:$E$28)),IF((Input!$I$2:$I$28=$B3)*(Input!$J$2:$J$28=$C3),Input!$E$2:$E$28),0))
    Copy down
    ----------------------------------
    Success? Celebrate it, click on the little star at the bottom left of my responses
    Last edited by Max, Singapore; 02-08-2014 at 10:28 PM.

  8. #8
    Registered User
    Join Date
    02-07-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Referencing a second Criteria within INDEX and MATCH

    Thanks Tony. It worked. This forum is the best thing since sliced bread.
    I spent a week on and off trying to sort this out! Should have some on this forum earlier.

    I'm sure yours would have worked also Max, but Tony's was first.
    Who da guru? Tony - Tony - Tony :o)

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

    Re: Referencing a second Criteria within INDEX and MATCH

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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: 04-30-2014, 02:42 AM
  2. Index Match based on 2 Criteria only returning 1 match
    By stsanders22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2012, 11:26 PM
  3. Referencing external file with Index/Match functions
    By valeous in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2010, 04:45 PM
  4. Referencing a calculated value in VLOOKUP and INDEX-MATCH
    By JillianRuth in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-12-2007, 08:01 PM
  5. referencing arrays in index and match
    By inky in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2007, 07:06 AM

Tags for this Thread

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