Vayikra / Leviticus 27:28 · Pshat
אַךְ־כָּל־חֵרֶם אֲשֶׁר יַחֲרִם אִישׁ לַיהוָה מִכָּל־אֲשֶׁר־לוֹ מֵאָדָם וּבְהֵמָה וּמִשְּׂדֵה אֲחֻזָּתוֹ לֹא יִמָּכֵר וְלֹא יִגָּאֵל כָּל־חֵרֶם קֹדֶשׁ־קָדָשִׁים הוּא לַיהוָה׃
But anything that a man sets apart by a ban for the Eternal, of all that he has, of man or beast or of the field of his holding, shall not be sold or redeemed: everything set apart by a ban is most holy to the Eternal.
Pshat פְּשָׁט
Whose is the ban
A person says: "This I give to God." But who exactly receives it, the Temple or the kohanim? On this depends whether what was given can later be redeemed.
Rashi: the sages disagree about a ban made without detail. Some say it goes to the Temple, and "everything banned in Israel is yours" speaks of what was banned expressly for the kohen. Others say a ban without detail goes to the kohanim. All agree: a ban for the kohanim is not redeemed until it reaches a kohen, while a ban for the Temple is redeemed. Shadal: the banned thing is given to the kohanim, it can neither be sold nor redeemed, for it is most holy.
How Rashi and Shadal explain it
Rashi But anything set apart by a ban and so on
Our teachers differed on this. Some say a ban without detail goes to the sanctuary. Then how do I uphold the verse "Everything banned in Israel shall be yours" (Bamidbar / Numbers 18:14)? It speaks of bans for the kohanim: a man stated it and said: "This is banned for the kohen." And others said a ban without detail goes to the kohanim.
Rashi Shall not be sold or redeemed
Rather it is given to the kohen. In the view of the one who says a ban without detail goes to the kohanim, this verse speaks of a ban without detail. And the one who says a ban without detail goes to the upkeep of the Temple explains this verse as speaking of bans for the kohanim. For all agree that bans for the kohanim have no redemption until they come into the kohen's hands, while bans for the One Above are redeemed.
Shadal But anything set apart by a ban
This is one who consecrates his Canaanite slaves, or his cattle, or his holding as a ban. Every ban is given to the kohanim: they cannot sell it to others (as it says of a consecrated thing, "and it shall be sold at your valuation"), and the owners too may not redeem it, for the ban is most holy, and one who is not a kohen is forbidden to benefit from it.
Takeaway
A ban (חֵרֶם) is what is wholly given to the Eternal and taken out of ordinary use. Onkelos keeps the same word: חֶרְמָא.
"And it shall be sold at your valuation" is Vayikra / Leviticus 27:27, of an unclean animal that was consecrated and not redeemed.