We study the existence and stability of solutions of the two-dimensional nonlinear Schrödinger equation in the combined presence of a parabolic and a periodic potential. The motivating physical example consists of Bose–Einstein condensates confined in an harmonic (e.g., magnetic) trap and an optical lattice. By connecting the nonlinear problem with the underlying linear spectrum, we examine the bifurcation of nonlinear modes out of the linear ones for both focusing and defocusing nonlinearities. In particular, we find real-valued solutions (such as multipoles) and complex-valued ones (such as vortices). A primary motivation of the present work is to develop “rules of thumb” about what waveforms to expect emerging in the nonlinear problem and about the stability of those modes. As a case example of the latter, we find that among the real-valued solutions, the one with larger norm for a fixed value of the chemical potential is expected to be unstable.