+ Reply to Thread
Results 1 to 8 of 8

Returning value from table subject to multiple criteria and conditions

  1. #1
    Registered User
    Join Date
    12-29-2015
    Location
    Coeur d'Alene, ID
    MS-Off Ver
    2013
    Posts
    4

    Returning value from table subject to multiple criteria and conditions

    This problem is driving me nuts -- I'm trying to rewrite this without nested IFs and use SUMIF, SUMPRODUCT, or some MATCH/INDEX combination instead.

    In English : What is the formula for C if I want it to return the label in H given the combination of matching A to Column E, then whether B is >= F and B < G?
    excel_help.png

    As an example, in Row 14. The process I'm looking for:

    1) Does A14 match a value in Column E? TRUE/FALSE
    2) On which row in the table is 1) TRUE, AND B14 >= F, B14 < G? (Note: the F&G test must be adjacent on the same row) Answer: row 4. Therefore, H4's text "vd3" is the desired output.


    THANKS!!!

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Returning value from table subject to multiple criteria and conditions

    try this formula in cell C2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-29-2015
    Location
    Coeur d'Alene, ID
    MS-Off Ver
    2013
    Posts
    4

    Re: Returning value from table subject to multiple criteria and conditions

    Thanks, I appreciate it. Unfortunately, it didn't work when I applied it to the actual table in my work book, as the sample for the question was an abbreviated version. Also ran into trouble trying to incorporate a third condition for the search -- so I need formulas for C and E. The other bug was trying to use different sheet references with that $F$ operator -- A-E is on sheet1! and H-N is on sheet2!.

    excel_help2.png

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,791

    Re: Returning value from table subject to multiple criteria and conditions

    Why not attach the workbook itself?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Returning value from table subject to multiple criteria and conditions

    pls attach a sample excel file instead of image
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Registered User
    Join Date
    12-29-2015
    Location
    Coeur d'Alene, ID
    MS-Off Ver
    2013
    Posts
    4

    Re: Returning value from table subject to multiple criteria and conditions

    My apologies for first submitting simplified lists -- I was trying to glean the general technique, then apply it to more complex situations. So here's the beast:

    I need formulas for Data! columns C, E, and G.

    Data! Column C: Match value from each row in Data! column A with Table! column A. Then where same row's Data! column B is >= Table! column B and < Table! column C, return Table! column D. (First match OK)

    Data! Column E: Match value from each row in Data! column A AND column C with Table! columns A and D, respectively. Then where Data! column D >= Table! column E and < Table! column F, return Table! column G. (First match OK)

    Data! Column G: Match value from each row in Data! columns A, C and E with Table! columns A, D and G respectively. Then where Data! column F >= Table! column H and < Table! column I, return Table! column K.


    Many many thanks!
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Returning value from table subject to multiple criteria and conditions

    Must easier to provide a potential solution once the complete details are provided. See attached. ExampleBook-Solution.xlsx

    In most LookUp scenarios,
    • Identify a value in the table that is unique to each row. In your case, i found it to be the last column SV Type.
    • If the unique value is non-numeric, I suggest inserting a column at the start as a serial number to each row. (Much easier to work with numbers).
    • Develop a formula to match the data conditions to the unique value (or row serial number).
    • Then simply apply VLookUp on the unique value (or row serial number) and return the other desired values from different columns.

    The approach I took is:
    • Created an additional column at the start to give a serial number to each unique combination of values.
    • Use SumProduct formula to return the unique serial number for the SV Type, based on the numerous <=, > criteria..
    • Apply VLookUp to the unique serial number and return the SV Type from Column G of Data! worksheet.
    • Manipulate the String in Column G to get the desired values for Column C and Column E. (Alternatively, you can apply VLookUp formula on the unique serial number and return values from the vd% and VSC columns respectively).

    Note: Some values appeared as 0.00 in Column J (SV<) that i felt were not in line with the trend. I've amended and highlighted those in the attached sample workbook. Please review the changes.

    Cheers!

  8. #8
    Registered User
    Join Date
    12-29-2015
    Location
    Coeur d'Alene, ID
    MS-Off Ver
    2013
    Posts
    4

    Re: Returning value from table subject to multiple criteria and conditions

    Cracked! Nice work, thank you. Serial very helpful!

+ 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] SUMIFS returning NIL on multiple conditions in one column
    By mysticmoron109 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-03-2015, 09:12 PM
  2. Returning value after checking multiple conditions
    By sp_key in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2015, 11:50 AM
  3. Replies: 2
    Last Post: 11-21-2014, 09:28 AM
  4. Replies: 3
    Last Post: 06-16-2014, 03:13 PM
  5. [SOLVED] Multiple selections with Checkboxes subject to conditions
    By Naz555 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-05-2013, 10:03 PM
  6. Returning a value if multiple conditions are met.
    By supguy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2013, 02:00 PM
  7. COUNTIFS - Referencing a Table with Multiple Criteria/Conditions
    By MediaTrap in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2013, 03:58 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