+ Reply to Thread
Results 1 to 9 of 9

Index with Match?

  1. #1
    Registered User
    Join Date
    03-28-2012
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    20

    Index with Match?

    Hello,

    I would like to be able to look up the last 3 values in a row that are not zero from another worksheet.

    I am using this formula on my current worksheet - {=+INDEX($AN2:$CH2,SMALL(IF($AN2:$CH2>0,COLUMN($AN2:$CH2)-COLUMN($AN2)+1),1))} and it works like a charm.

    However when i try to lookup a value from my current worksheet and extract the last 3 non zero results from another worksheet i am having no luck putting a formula together.

    So lets say I want to find the last 3 test scores from a student that are located on a different sheet - how would i do that?

    Like i said if the text scores were on the same page the above formula works...i just don't know how to combine match or some type of lookup with this formula to get the result i need.

    Any help is appreciated.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Index with Match?

    Current formula has no "lookup value". It tried to get the last nth positive value from the right of every row

    New requirement ask for "lookup value", I guess it is student ID in current WS to specify which row in other WS, then get the involving data.

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Quang PT

  3. #3
    Registered User
    Join Date
    03-28-2012
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Index with Match?

    thanks for the reply

    I do realize there is no lookup value as i specifically indicated that - "i just don't know how to combine match or some type of lookup with this formula to get the result i need"

    i need a a formula that looks up the value on another sheet and brings back the first 5 non-zero results.

    my first post has the formula for the second part - i just cannot figure out the lookup part...

    Attached is a basic spreadsheet example...
    Attached Files Attached Files

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Index with Match?

    Try in B7

    Please Login or Register  to view this content.
    Drag down and accross
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-28-2012
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Index with Match?

    So i am getting a #NAME? error - however - i am using EXCEL 2007 - so maybe the AGGREGATE command is in the newer editions...

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Index with Match?

    Hi,

    Bebo021999's formula for Excel 2007

    in B7

    =INDEX(Sheet2!$A$2:$L$4,MATCH($A7,Sheet2!$A$2:$A$4,0),SMALL(IF(Sheet2!$A$2:$A$4=$A7,IF(Sheet2!$D$2:$L$4,COLUMN(Sheet2!$D:$L))),COLUMNS($A:A)))

    Press F2 to edit the formula, then press CTRL+SHIFT+ENTER to confirm the formula then copy across.

    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Index with Match?

    Quote Originally Posted by rrmack34 View Post
    So i am getting a #NAME? error - however - i am using EXCEL 2007 - so maybe the AGGREGATE command is in the newer editions...
    Sure. It is strong function but for 2010+ only.
    So, follow "INDEX(SMALL ..." construction with array formula.

  8. #8
    Registered User
    Join Date
    03-28-2012
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Index with Match?

    My apologies - after doing the CTRL + SHIFT + ENTER it worked.

    I thought i had done it but i guess i had not.

    Again - thanks all for your help...

    By far the best source of help anywhere.

  9. #9
    Registered User
    Join Date
    03-28-2012
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Index with Match?

    Sorry for the delay in marking solved - was still having issues with the formula - determined that it would not return text - just numbers - so I am good now. Thanks...

+ 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. [SOLVED] INDEX+MATCH instead of VLOOKUP+MATCH, why is INDEX a better choice and how to re-write?
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2016, 10:54 AM
  2. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  3. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  4. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  7. Replies: 3
    Last Post: 05-02-2013, 01:31 AM

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