+ Reply to Thread
Results 1 to 4 of 4

INDEX MATCH based on 5 criteria, including a date range.

  1. #1
    Registered User
    Join Date
    09-16-2010
    Location
    Glasgow
    MS-Off Ver
    2010
    Posts
    68

    INDEX MATCH based on 5 criteria, including a date range.

    Hi all,

    I would need a formula to retrieve a value (i.e. the Annual Unit Price) from a lookup table based on 5 criteria, i.e.:
    - Country
    - Product Code
    - Service Level
    - Service Type
    - Start Date (if it falls between a date range)

    Test.jpg

    From the attached screenshot, my lookup table can be found in A5:G13. In columns I to M are the 'matching' values I need to find in the lookup table, and column N is the retrieved value.

    I have managed the following so far:

    1) In cell N3, I used the array formula below to retrieve the Annual Unit Price based on the 4 criteria:
    - Country - cell I3
    - Product Code - cell J3
    - Service Level - cell K3
    - Service Type - cell L3

    Please Login or Register  to view this content.
    2) In cell N4, I used the array formula below to retrieve the Annual Unit Price if the Start Date (cell M4) falls between the Start Date (column E) and End Date (column F):

    Please Login or Register  to view this content.
    I have now problems combining 1 and 2 above to have a single formula to retrieve the Annual Unit Price based on the 5 criteria; cell N6 shows the value that the formula would need to retrieve. Anyone could help 'merging' both formulas?

    PS: also, if no matching values can be retrieved from the lookup table, is it possible for the formula to return 0 instead of #N/A?

    Thanks a lot,
    Ant

    Test.xlsx

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: INDEX MATCH based on 5 criteria, including a date range.

    hi Ant. is there a chance the 5 criteria appears more than once? if not, then this would be pretty efficient:
    =SUMIFS($G$3:$G$13,$A$3:$A$13,I3,$B$3:$B$13,J3,$C$3:$C$13,K3,$D$3:$D$13,L3,$E$3:$E$13,"<="&M3,$F$3:$F$13,">="&M3)

    if it appears more than once, it will sum up all the Unit Prices. if you have such instances & only want to return the 1st value, try this array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    09-16-2010
    Location
    Glasgow
    MS-Off Ver
    2010
    Posts
    68

    Re: INDEX MATCH based on 5 criteria, including a date range.

    Hi benishiryo,

    Thanks a lot for your quick reply, simply brilliant! Thank you very much, the 5 criteria should never appear more than once, so I used the SUMIFS function and it works great, way more efficient than what I was trying to do.

    Thanks again,
    Ant

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: INDEX MATCH based on 5 criteria, including a date range.

    Fix it bro....

    Pls check the files


    Azumi
    Attached Files Attached Files

+ 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 with date range criteria
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 10-24-2013, 04:58 PM
  2. [SOLVED] Using Index/Match using criteria including range between two cells
    By fer907 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2013, 04:07 PM
  3. [SOLVED] Count based on 3 criteria including date range
    By timarcarze in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 06-13-2013, 01:43 AM
  4. 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
  5. Replies: 5
    Last Post: 05-23-2011, 12:04 PM

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