+ Reply to Thread
Results 1 to 5 of 5

Index Match with Multiple Criteria Using Same Criteria Column

  1. #1
    Registered User
    Join Date
    11-21-2014
    Location
    Brooklyn, NY
    MS-Off Ver
    2007
    Posts
    15

    Index Match with Multiple Criteria Using Same Criteria Column

    Hi,

    I'm trying to build an index-match formula that involves multiple criteria and the criteria refer to the same columns between the two things being matched. For example, I have the following sample table.


    Ingredient Ingredient_Enhancer Meal Time Location Calories Calories_Contributed_by_Stew
    Butter Pasta Breakfast Home 5
    Rosemary Steak Breakfast Home 10
    Carrots Celery Soup Breakfast Home 15
    Celery Stew Breakfast Home 20 40
    Potatoes Celery Fried Rice Breakfast Home 25
    Butter Pasta Lunch Home 30
    Rosemary Steak Lunch Home 35
    Carrots Celery Soup Lunch Home 40
    Celery Stew Lunch Home 45 40
    Potatoes Fried Rice Lunch Home 50
    Butter Pasta Breakfast Restaurant 55
    Rosemary Steak Breakfast Restaurant 60
    Carrots Celery Soup Breakfast Restaurant 65
    Celery Stew Breakfast Restaurant 70 65
    Potatoes Celery Fried Rice Breakfast Restaurant 75

    I want to build a formula in the "Soup Calories by Stew" column where the following conditions are met:

    For each Stew record, enter in the "Calories Contributed by Stew" column the sum of all Calories for which:
    (1) the Stew's Ingredient (ie. "Celery) is found in the Ingredient Enhancer for other Meals;
    AND (2) the Time of those other Meals match the Time of the Stew;
    AND (2) the Location of those other Meals match the Location of the Stew

    For example, the "Calories Contributed by Stew" for the Breakfast Stew is 40 because it is the sum of the Calories of the Breakfast Soup and the Breakfast Fried Rice, both of whose Ingredient Enhancer (ie. "Celery") match the Ingredient of the Stew, both of whose Time (ie. "Breakfast") match the Time of the Stew, and both of whose Location (ie. "Home") match the Location of the Stew.

    I tried this formula but it doesn't work.

    =INDEX(SUM(Calories),MATCH(Ingredient,Ingredient_Enhancer,Time,Time,Location,Location,0))

    Your help will be appreciated.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,043

    Re: Index Match with Multiple Criteria Using Same Criteria Column

    Here is a formula that should do what you want:
    Please Login or Register  to view this content.
    Here is a file that shows how the formula will be applied to column H:
    Calorie Counter.xlsx
    BTW it seems to me that the calorie count of the breakfast stew at the restaurant should be 140 based on your chart.
    Let me know if you have questions.

  3. #3
    Registered User
    Join Date
    11-21-2014
    Location
    Brooklyn, NY
    MS-Off Ver
    2007
    Posts
    15

    Re: Index Match with Multiple Criteria Using Same Criteria Column

    This worked wonderfully. Thanks!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,043

    Re: Index Match with Multiple Criteria Using Same Criteria Column

    You're welcome and thanks for the feedback. Please use the thread tools above your first post in the thread to mark the thread 'Solved'. Hope that you have a good day.

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,885

    Re: Index Match with Multiple Criteria Using Same Criteria Column

    A shorter version:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

+ 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: 7
    Last Post: 07-26-2015, 04:02 PM
  2. [SOLVED] Return Multiple values from a column with index and match, and search criteria
    By marcusduton in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 02-15-2015, 09:59 PM
  3. [SOLVED] Index/Match Formula - multiple criteria in one column
    By davemon in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-19-2014, 03:00 PM
  4. Replies: 2
    Last Post: 09-27-2014, 04:34 PM
  5. Replies: 3
    Last Post: 06-15-2012, 04:19 PM
  6. Replies: 2
    Last Post: 01-27-2012, 01:32 PM
  7. [SOLVED] Vlookup or index/match with multiple column and criteria?
    By xirx in forum Excel General
    Replies: 2
    Last Post: 07-22-2005, 08:05 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