Q. Should it be “Nobody but she and Sandra knew if he was lying” or “Nobody but her and Sandra knew if he was lying”? Surely, nobody but the Chicago Q&A will know which is correct—or if neither is!
A. Choose the second version: “Nobody but her and Sandra knew if he was lying.” Rearranging the words in the sentence can help to confirm the right answer: “Nobody knew if he was lying but her and Sandra.” It should now be clear that “nobody” and “he” are the subjects of the verbs “knew” and “was lying,” respectively, whereas “her” and “Sandra” are objects of the preposition “but.” So “her”—which is in the objective case—is correct.
[Editor’s update: It turns out we were a bit hasty with our answer. It’s true that the word “but” can act as a preposition in “nobody but [pronoun]” constructions—as it does in our reordered version of the original, in which the phrase beginning with “but” has been moved to follow the verb “knew.” In that version, the objective “her” is always correct: “Nobody knew if he was lying but [i.e., except] her and Sandra.” But according to Bryan Garner, when the phrase with “but” precedes the verb, “but” can be said to be acting as a conjunction; accordingly, “she” would be the “traditionally” accepted choice in the sentence as originally worded: “Nobody but she and Sandra knew if he was lying.” The version with “her” (as in our original answer), meanwhile, has achieved stage 5 in Garner’s language-change index: “universally accepted (not counting pseudo-snoot eccentrics).” In sum, either answer is acceptable. For the full explanation (and the “dissenting opinion” that supports our original answer with, according to Garner, “impeccable” logic), see Garner’s Modern English Usage, 4th ed. (Oxford University Press, 2016), under “but: D. Preposition or Conjunction.”]