Mike,
Without digging up my old Linear Algebra textbook (the thought of that makes me want to hide under my desk in the fetal position) I don't believe this can be reduced to one formula. There are currently 26 categories and each of those categories will need to show/hide 1 to 23 sections. Several of the categories will use a section that is used in another category. The numbers will increase in the near future and are not likely to remain static for long. The current state has almost 600 permutations and I don't see this approach being very maintainable going forward.
------------------------------
Paul Peterson
------------------------------