+ Reply to Thread
Results 1 to 15 of 15

Retrieve Value from table using several criteria.

  1. #1
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Retrieve Value from table using several criteria.

    I'm looking for a formula I can put in cell M7 of the attached spreadsheet and using the criteria in cells M1:M6 to pull a rate from the table in the spreadsheet. In column N, I have indicated how the criteria needs to match the table. Using my example criteria in cells M1:M6, the formula needs to return a rate of 14.55%. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Retrieve Value from table using several criteria.

    =INDEX($F$1:$J$22,AGGREGATE(15,6,ROW($A$3:$A$22)/(ABS($E$3:$E$22-M1)=MIN(IF((ABS($B$3:$B$22-M5)=MIN(IF(($D$3:$D$22=M3)*($C$3:$C$22=M4)*($A$3:$A$22=M6),ABS($B$3:$B$22-M5))))*($D$3:$D$22=M3)*($C$3:$C$22=M4)*($A$3:$A$22=M6),ABS($E$3:$E$22-M1)))),1),M2) CSE
    why not 10/05%?
    Last edited by tim201110; 08-09-2019 at 04:47 PM.

  3. #3
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    Thanks Tim. I don't want the range that is equal to 15000. I need the closet range that is greater than 15000, so I'm expecting 14.55% instead of 10.05%. I also need to have the formula dynamic enough to match the year in cells F2:J2, if those years were in a random order instead of sequentially starting with 1.

  4. #4
    Forum Contributor
    Join Date
    03-29-2013
    Location
    lakewood, usa
    MS-Off Ver
    exce2013
    Posts
    112

    Re: Retrieve Value from table using several criteria.

    mark_luke, What would you expect with the following criteria?
    Lookup Date 7/12/2019
    Lookup Year 3
    Lookup Period 3
    Lookup Region S
    Lookup Range 20000
    There are 3 matches to that set.

  5. #5
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    If multiple matches, pull the first match (row 16).

  6. #6
    Forum Contributor
    Join Date
    03-29-2013
    Location
    lakewood, usa
    MS-Off Ver
    exce2013
    Posts
    112

    Re: Retrieve Value from table using several criteria.

    The fix will test if the result is blank(0). if so use the row (added in M12) and index row+1The row number for the index is array of all of the criteria.


    It is all PURPLE SMOKE & MIRRORS
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    These formulas are not meeting my needs for the criteria I have stipulated. The closest formula I can get is one that I have come up with in this spreadsheet. On Sheet 1, I have a formula in cell M7 that pulls the correct value from the table based on the inputs I have. The formula needs to match the Type, Region, Period & Year exactly along with finding the closest date that is less than or equal to the input criteria and then find the closet range that is greater than the input criteria (excluding rates from table that are blank). I need to fix the formula so it doesn't recalculate the rate in the table. For example on Sheet 2, the formula has recalculated the rate and is pulling 2.288% instead of 3.00%. The formula can use something other than aggregate, as long as it pulls the correct rate.
    Attached Files Attached Files

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Retrieve Value from table using several criteria.

    Please try array entering
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BTW:
    Are you open to helper column(s)? I believe this could be far simpler.
    Dave

  9. #9
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    Can you please add the date check to the formula? I would be open to helper columns.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Retrieve Value from table using several criteria.

    Quote Originally Posted by mark_luke View Post
    Can you please add the date check to the formula? ...
    That's what this part does.
    MATCH($M$2,$F$2:$J$2,0)

  11. #11
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    That part is matching the year to get the correct column, but the formula does not reference column E or the date in cell M1, which is also needed to get the correct row.

  12. #12
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Retrieve Value from table using several criteria.

    In the attached please find in helper column K
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then in M7
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    03-29-2013
    Location
    lakewood, usa
    MS-Off Ver
    exce2013
    Posts
    112

    Re: Retrieve Value from table using several criteria.

    You changed the criteria. You now state that the range is determined after the the date is determined. Not in the original request.

  14. #14
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    Quote Originally Posted by wyowhite View Post
    You changed the criteria. You now state that the range is determined after the the date is determined. Not in the original request.
    Because of forum rules, I was not allowed to have another thread. Your formula doesn't work for either request.

  15. #15
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Retrieve Value from table using several criteria.

    I've solved the formula that is needed.

+ 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. how to retrieve text with criteria
    By Villalobos in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-17-2019, 04:32 AM
  2. [SOLVED] Attempting to retrieve data from a table with multiple criteria
    By Welshcontingent in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-22-2017, 08:01 PM
  3. [SOLVED] Help, Match and Retrieve on criteria....
    By AshleyB2912 in forum Excel General
    Replies: 15
    Last Post: 06-03-2016, 10:34 AM
  4. Replies: 1
    Last Post: 09-03-2015, 02:53 PM
  5. [SOLVED] Retrieve a value when multiple criteria have been met
    By 5worthington in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2013, 05:19 PM
  6. Reference / retrieve data from a table and populate a table in a different workbook?
    By philuptuous in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-17-2012, 06:21 AM
  7. How to retrieve names from the table? 2 criteria given
    By ABSTRAKTUS in forum Excel General
    Replies: 3
    Last Post: 05-10-2010, 01:15 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