Dependent Table Analysis Problem

RaydenUK

Board Regular
Joined
Mar 25, 2014
Messages
74
I am clueless as to even attempting this type of problem, but I am trying to figure out a way to automatically have excel to pick the appropriate group based on 1 or 2 options chosen. I work for a drug testing company and when the analysts are typing in patient data and choosing the different drugs that need to be tested for, I want excel to return in the appropriate cell the best drug panel or panels to run the patients on. For example:

[TABLE="width: 240"]
<tbody>[TR]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"]Panel 1[/TD]
[TD="width: 64, bgcolor: transparent"]Panel 2[/TD]
[TD="width: 64, bgcolor: transparent"]Panel 3[/TD]
[TD="width: 64, bgcolor: transparent"]Panel 4[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 1
[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 2[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 3[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 4[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 5[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 6[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 7[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 8
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug 9[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Drug10
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"]X[/TD]
[/TR]
</tbody>[/TABLE]

As you can see, Panel 1 processes 3 different drug types, whereas Panel 2 processes those same three drugs plus 2 others. Ideally if the analysts were to just choose drug 1 then the quickest panel to process would be panel 1 because it is shorter, hence requiring less time to run. However, usually 2 drugs are tested for. This is where my excel has lost me. If Drug 2 and Drug 5 were Chosen for a particular patient then ideally panel 2 would need to be ran because it kills two birds with one stone. But lets say that Drug 2 and Drug 8 were chosen, then I would need excel to return Panel 1 (which is shorter than Panel 2) and Panel 4. I have a userform setup that allows for up to two drugs to be chosen from drop down boxes, each using the same comprehensive drug list. If possible, I would like for excel to return the appropriate panel(s) in a box, possibly the list box, on the userform following the selection of the drug(s) to be tested for. If not, then is there some type of way for excel to analyze the table and spit out something that I could work with. I would greatly appreciate any help, It would be a life saver.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,223,952
Messages
6,175,594
Members
452,654
Latest member
mememe101

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top