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.
[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.