Removing several revit elements based on a shared parameter

I currently have a project consisting of several hundred blocks (representing rooms) all with varying parameters. They are currently all grouped with building codes (as one of the params) and I want to remove any without a specific building code.

eg, I have a list of elements with building codes from 1 - 100, and I want to remove any element that has a building code of 2, 6, 60 or 87.

Can anyone help? I’ve currently tried grouping any element with matching building codes but then have no idea how to remove a list of specific values from another

Hi,

can you show us what you have tried?
based on your description it should be doable