Q: Which is correct: “Give it to whomever needs it” or “Give it to whoever needs it”? In other words, is “whomever” the object of the preposition “to,” or is it the subject of the verb “needs”? Or does it matter?
A: To answer your last question first, yes it does matter, especially in formal writing when your English should be at its best. (I’ll get to speech and informal writing later.)
The most important point to remember in this “who” vs. ”whom” business is that “who” (or “whoever”) does something to “whom” (or “whomever”). In other words, “who” is a subject like “he,” and “whom” is an object like “him.”
Although a preposition (a positioning word like “to”) is often followed by “whom” or “whomever,” that’s not always the case.
Sometimes a preposition is followed by a clause that begins with “who” or “whoever.” (A clause is a group of words with its own subject and verb.)
Here’s an example from my grammar book Woe Is I: “After the crap game, Nathan was confused about who owed him money.”
As for your first two questions, “whoever” is the subject of a clause, so the correct sentence is “Give it to whoever needs it.”
Again, this is for when you want your English to be at its best. In conversation and informal writing, “who” (or “whoever”) is gaining acceptance at the beginning of a sentence or a clause.
Buy Pat’s books at a local store or Amazon.com.