I allow the user to select a bunch of cells, and then perform operations on the rows of those cells. However there is a certain row that I want to unselect automatically if it is selected.

I have a custom shortcut menu that appears when the user right clicks on the selected rows: when the user right-clicks, and one of the cells selected is in the "forbidden row" - then I want cells in the forbidden row to be unselected. How do I do this?

I have looked online to find out how to unselect a range, but it only shows how to unselect the entire selected range, and not just a subset of the selected range.

Thanks!