Auto check Checklist when Dropdown multi selections match custom grouping

I have a Dropdown and a Checklist object, the Dropdown has a large list of 3 digit codes, the Checklist is composed of a list of groupings of the codes in the Dropdown.
I can add values to the Dropdown (multi select) and I also have a callback that auto fills the Dropdown when I check the respective grouping on the Checklist the respective codes will auto populate the Dropdown. I am having a hard time creating a callback that when subsequently unchecks or check the the respective Checklist grouping when I select all the matching codes in the Dropdown.

Thank you for your help,

Claudio