Leviticus 27:33

He shall not search whether it be good or bad, neither shall he change it: and if he change it at all, then both it and the change thereof shall be holy; it shall not be redeemed.

Cross-reference

Leviticus 27:10 has the same prohibition against exchanging dedicated animals — a near-identical rule applied to vowed animals.

Ezekiel 48:14 also forbids selling or exchanging holy things — the same principle applied to the priests' portion of land.