• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Lookup 3 columns from 2 tables

rrocker1405

Member
Hi team,

I have been trying to solve the below but for some reason, I cannot find a way...any help would be of great help. Attached is a sample workbook for reference. The workbook has the following, the first table has products with a combination of products, these are combinations that are not allowed when a new product is requested.

Table 1:

Product 1Product 2
ABCDEF
ABCGHI
ABCJKL
DEFZYX
DEFMNO
ZYXABC
ZYXJKL
ZYXDEF

The 2nd table includes sales person and their products for which they are responsible to sell.

Table 2:

Sales PersonProducts
John DoeDEF
John DoeGHI
John DoeMNO

There would be a form where a sales rep can request a new product to be included in his / her catalog, The check that is required to be perform is to verify if the products already in the catalog i.e., table 2 and the newly requested is a combination that is not part of the combination in table 1. If the product requested is a combination from table 1 after looking in to the existing values, then it should be denied else output should be granted.

Following is a sample of the table with output.

Input by user(s)Output
RequestorRequested Product
John DoeABCDenied

The output result is denied as the requested Product ABC with combination DEF which is already part of the user catalog in table 2 is not a valid combination. Any suggestion, help will be of great help here.

Regards,
A!

https://1drv.ms/u/s!Aj7kf6Fnqc5SyTIwwHjuCtcHIRJT?e=XT7LtZ
 
Please try at I3

=IF(SUMPRODUCT(COUNTIFS($A$2:$A$9,REPT($E$2:$E$9,$D$2:$D$9=G3),$B$2:$B$9,H3))+SUMPRODUCT(COUNTIFS($B$2:$B$9,REPT($E$2:$E$9,$D$2:$D$9=G3),$A$2:$A$9,H3)),"Denied","Granted")
 

Attachments

  • Sample.xlsx
    18.4 KB · Views: 15
Hi @Excel Wizard ,

Thank you for the quick and sharp function to solve my issue. However, when am extending the data range from 9 to the dataset i have the results appear as 0, would you know why?

Regards,
A!
 
Back
Top