Maybe it’s a subordinate clause lesson, because that’s the key here.
From the June 2021 Scientific American, page 62:
Last line. Shouldn’t that be “to whomever…”? After all, “to” is a preposition, so we should use the objective case, right? Nope.
Here’s the rule:
- Go from the inside to the outside.
What’s inside the prepositional phrase? A noun clause! And “who” (well, “whoever”) is the subject of “needed,” so it gets the nominative case!
So there you have it. Sometimes you can say “to who.”