+ Reply to Thread
Results 1 to 6 of 6

Match Index multiple columns

  1. #1
    Registered User
    Join Date
    10-19-2016
    Location
    NYC
    MS-Off Ver
    Windows 7
    Posts
    6

    Match Index multiple columns

    Hi,

    I'm trying to figure out how to use a Match Index for my example below.

    I've got a list of all the dates where fruit were sold. They're all unique and there are no duplicates. I've then arranged them in a column (under date) and want to the fruit that was sold on that date to appear in the column "What fruit?".

    Would anyone have an idea of how to do this? It seems like it should be easy but can't find an answer anywhere!

    Cheers


    Product Sold on Sold on2 Sold on3 Sold on4 Sold on5
    Apples 01-Jan 01-May 07-Jun
    Pears 04-Jan 02-Feb
    Bananas 05-Apr 10-Dec 11-Nov 09-Sep 07-Jul

    Date What fruit?
    01-Jan #N/A
    04-Jan #N/A
    05-Apr #N/A
    01-May #N/A
    02-Feb #N/A
    10-Dec #N/A
    07-Jun #N/A
    11-Nov #N/A
    09-Sep #N/A
    07-Jul #N/A

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Match Index multiple columns

    Hi, welcome to the forum

    Often, a copy/paste of data to here, doesnt quite come out as expected

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-19-2016
    Location
    NYC
    MS-Off Ver
    Windows 7
    Posts
    6

    Re: Match Index multiple columns

    Hi thanks for the tip. I've attached a copy of the dummy data
    Attached Files Attached Files

  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: Match Index multiple columns

    This array formula** entered in G8 and copied down:

    =INDEX(F$3:F$5,MAX(IF(G$3:K$5=F8,ROW(G$3:K$5)))-ROW(G$3)+1)

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: Match Index multiple columns

    Try this ...

    =INDEX($F$3:$F$5,MAX(IF($G$3:$K$5=F8,ROW($G$3:$K$5)))-2)

    Array formula, enter with Ctrl+Shift+Enter.

  6. #6
    Registered User
    Join Date
    10-19-2016
    Location
    NYC
    MS-Off Ver
    Windows 7
    Posts
    6

    Re: Match Index multiple columns

    Hi,

    Just tested this and works perfect! Thanks so much. If you could explain what the formula means and how it works, that would be great!

+ 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. INDEX MATCH MATCH multiple columns with same heading
    By djm198 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2016, 02:34 PM
  2. [SOLVED] Using index,match with multiple columns
    By kriminaal in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-10-2015, 01:07 PM
  3. [SOLVED] Index Match multiple columns
    By Bravo33 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2013, 10:42 AM
  4. Index Match Across Multiple Columns
    By FFastZB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-20-2013, 04:58 PM
  5. [SOLVED] Index/Match across multiple columns
    By BB1972 in forum Excel General
    Replies: 2
    Last Post: 07-27-2012, 12:05 PM
  6. [SOLVED] Index/Match against multiple columns
    By paradox34690 in forum Excel General
    Replies: 8
    Last Post: 04-28-2012, 12:43 PM
  7. [SOLVED] Index/Match from multiple columns
    By hgopp99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-21-2006, 02:15 PM

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