Is there a way to alter the cell protection based on a condition instead of
going in and manually changing them?

more exact: I want to protect all my cells that have a formula, and
un-protect the ones that do not.