+ Reply to Thread
Results 1 to 6 of 6

Check Qualification based on Multiple Criteria Using a Table with Logic Operators

  1. #1
    Registered User
    Join Date
    12-08-2015
    Location
    Cincinnati
    MS-Off Ver
    365
    Posts
    26

    Check Qualification based on Multiple Criteria Using a Table with Logic Operators

    Hello and thank you in advance for any help or guidance you can provide.

    I have a situation where I need to determine whether a business qualifies for a sales program, and if they do qualify, what Tier and Sub-Tier do they fall in. There are several criteria to take into consideration. Rather than write out long nested If/Then/AND/OR statements, I was hoping to set up the qualification requirements in a table for easier management and updating. I have tried creating a table and using Index/Match with multiple criteria, but I was having trouble with the AND/ OR logic within it. I also tried breaking down the logic into chunks based on each qualifier, and then building a reference id that could be used in a look up table, but I had the same issues with the AND/OR Logic.

    In my attached sample, the top portion tries to lay out the current qualification logic in plain English. The Output section takes the Input parameters and uses them in a standard nested if statement, to compare to the qualifiers in the table. It works and can return the Tier and Sub-Tier, but I was hoping for a more dynamic solution. I?d like to basically have the logic outlined in a table, and then use the inputs to lookup which Tier and Sub-Tier the Business would fall in to. The last section illustrates what I foresee could be updated qualifications.

    Cross Posted@
    Mr.Excel
    https://chandoo.org/forum/threads/ch...erators.49852/
    Attached Files Attached Files
    Last edited by jdutle; 11-16-2022 at 01:41 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,533

    Re: Check Qualification based on Multiple Criteria Using a Table with Logic Operators

    I don't follow all of the logic.
    If the number of new clients is changed to 9 and the new sales is changed to $500,000 sub tier (cell J17) displays 1.
    Looking at the tst table it would seem that sub tier should display 2.
    If 1 is correct, please explain why.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    12-08-2015
    Location
    Cincinnati
    MS-Off Ver
    365
    Posts
    26

    Re: Check Qualification based on Multiple Criteria Using a Table with Logic Operators

    Hi JeteMc. Thanks for taking a look. You are correct, it should have displayed 2. I had forgotten to break out the 1 & 2 levels in my nested if statement. I corrected the logic and re-attached the file.

    The code went from this:
    "=IF(I17="Not Eligible","Not Eligible",IF(AND(I17="Tier 1",OR(AND(B17>=E22,C17>=H22),C17>=H23)),"1",IF(AND(I17="Tier 2",OR(AND(B17>=E24,C17>=H24),C17>=H25)),"2")))"
    to this:

    "=IF(I17="Not Eligible","Not Eligible",IF(AND(I17="Tier 1",AND(B17>=E22,C17>=H22)),"1",IF(AND(I17="Tier 1",C17>=H23),"2",IF(AND(I17="Tier 2",(AND(B17>=E24,C17>=H24))),"1",IF(AND(I17="Tier 2",C17>=H25),"2")))))"


    This is why I am trying to set up the logic in a table of some kind so its easier to see. I have not tried creating a nested if statement for the Potential Scenario table (tbl_11), but I'm sure it will at least be double that of the original rules table. Figuring out the formulas once is not complicated, but it takes time (and obviously its easy to make mistakes). I'm hoping to find a solution that is more dynamic, where the requirements and logic can be quickly updated on the fly for multiple situations.

    I tried to put together an example in Sheet2 of the updated workbook for what I was thinking. Its a little rough, but it seems like it might be working. Once all of the logic is worked out, I think the table could be updated as needed, and it should spit out the results. My only worry is that if a new variable needs to be added, I'd have to go back and rewrite the formulas of the table, which defeats the purpose.

    Columns "C,G,K" check the input numbers against qualification numbers using the symbol supplied in the adjacent columns "A,E,I". Then in columns "N,O" the logic operator in column H is used to determine if the qualifications are being met. The Tier is then displayed in the row where the qualifications are met. They may appear twice, if both sub tiers are being met. Columns E,F clean up the results of N,O.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,533

    Re: Check Qualification based on Multiple Criteria Using a Table with Logic Operators

    For ease of adding more variables I would suggest the following as modeled in rows 26:34 on Sheet2.
    1. Changing the values in the current business column to minimums (i.e. the last two are >= $0)
    2. Change the N/A's in the new client column to zeros
    3. Modify the formula in the test columns to: =A$17>=[@[Current Business $]] ; =B$17>=[@[New Clients]] and =C$17>=[@[New Sales $]] respectively
    4. Modify the formulas in the lookup columns to: =IF(AND($C31,$G31,$K31),L31,"")
    5. Leave the output tier formula but modify the sub-tier formula to read: =IF(E28="Not Eligible","Not Eligible",INDEX(tst_245[SubTier Lookup],MATCH(E28,tst_245[Tier Lookup],0)))
    Let us know if you have any questions.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-08-2015
    Location
    Cincinnati
    MS-Off Ver
    365
    Posts
    26

    Re: Check Qualification based on Multiple Criteria Using a Table with Logic Operators

    Thank you for that! I appreciate your help, JeteMc!

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,533

    Re: Check Qualification based on Multiple Criteria Using a Table with Logic Operators

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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: 16
    Last Post: 10-13-2022, 05:45 AM
  2. Check if row is valid based on multiple criteria from range...
    By JMHenriques in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2021, 12:31 PM
  3. Data based on multiple criteria in initial table and correspondence table
    By gege-lolo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2019, 08:29 AM
  4. Sort and Delete Data Based on Multiple Criteria Using Check Box in Userform
    By Primas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2016, 01:16 AM
  5. Using a Switch Case with logic operators on dates
    By biguel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2016, 02:16 PM
  6. Check for errors and correct them based on specific logic
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-08-2016, 12:33 PM
  7. Select multiple criteria based on check box selection and return all unique values.
    By TommyToe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2013, 09:14 AM

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