- Nobody but him was present.
- Nobody but he was present.
Which usage is correct?
This question comes up a lot. In short, the answer is that in general both versions are acceptable. Though for some speakers, there might be some style differences between them, where the nominative "he" version might be considered to be rather formal in style.
A usage dictionary, such as Merriam-Webster's (Concise) Dictionary of English Usage (MWDEU or MWCDEU), will usually discuss this issue. In my copy of MWCDEU, it is discussed within the "But" entry, section #2, pages 151-2. These are some of their examples:
. . . none but he can have seen them all --Times Literary Supp., 16 June 1966
Everybody but me among us old codgers proudly insists that he and his wife were married just like the kids of today --James Thurber, letter, 22 Dec. 1952
and this is their concluding paragraph:
Our conclusion is that the absolutists who insist that but is only a conjunction or only a preposition are wrong. But has functioned in both capacities since Old English and still does. You are correct in choosing to use it either way. Bear in mind, however, that conjunctive but followed by a nominative pronoun seems rather more literary than the preposition.
Here's some info from a vetted grammar source, the 2002 CGEL. On page 1312:
But with the sense "except": preposition vs coordinator
[19]
i.a. Everyone but Jill was told. - - - - - - - - b. *But Jill, everyone was told.
ii.a. Everyone but [ %I / %me ] was told. - - b. Everyone was told but me.
But here has the same meaning as the preposition except, suggesting that it too is a preposition. It differs syntactically from except, in that it can't occur initially, as shown in [i.b]: in this respect it is like a coordinator -- cf. property (d) of &2.1.
In [ii.a] both nominative and accusative forms of the pronoun are found, and this suggests that but can be construed as either a coordinator or a preposition. Following a coordinator, the pronoun will take nominative case because it is part of the subject (cf. neither Jill nor I was told); following a preposition it will take accusative case (cf. Everyone [ except / with the exception of ] me was told). In They told everyone but me the accusative is obligatory, but provides no evidence as to the structure since a coordinate pronoun in this position would also be accusative (They told neither Jill nor me).
Accusative is much the more usual case in [ii.a], with nominative very formal in style, and very much a minority variant: for most speakers but in this sense is a preposition. Notice, moreover, that in [ii.b], where but + pronoun is postposed, a nominative is virtually excluded even for speakers who have one in [ii.a]: it seems that in this position but is construed as a preposition by just about all speakers.
Legend for the symbols '*' and '%' :
* -- ungrammatical, e.g. *This books is mine.
% -- grammatical in some dialect(s) only, e.g. %He hadn't many friends.
NOTE: The 2002 CGEL is the 2002 reference grammar by Huddleston and Pullum (et al.), The Cambridge Grammar of the English Language.