  Variational Monte Carlo methods have recently been applied to the calculation
of excited states; however, it is still an open question what objective
function is most effective. A promising approach is to optimize excited states
using a penalty to minimize overlap with lower eigenstates, which has the
drawback that states must be computed one at a time. We derive a general
framework for constructing objective functions with minima at the the lowest
$N$ eigenstates of a many-body Hamiltonian. The objective function uses a
weighted average of the energies and an overlap penalty, which must satisfy
several conditions. We show this objective function has a minimum at the exact
eigenstates for a finite penalty, and provide a few strategies to minimize the
objective function. The method is demonstrated using ab initio variational
Monte Carlo to calculate the degenerate first excited state of a CO molecule.
