A combined experimental and theoretical study of the infrared (IR) spectra of 2naphthaldehyde and 9-fluorenone in their ground and first excited singlet and triplet electronic states is presented. IR studies have also been carried out using supercritical krypton (scKr) as a solvent to measure spectra in the ground and triplet excited states. This solvent provides a weakly interacting environment that is closer to the gas phase and allows a direct comparison with the calculated spectra for a single molecule. The IR spectra for the three different states are computed with Kohn-Sham density functional theory. For the first excited singlet state it is necessary to use an overlap procedure that allows the excited state to be studied by preventing variational collapse to the ground state. This allows the excited singlet state to be studied in an analogous approach to the ground and excited triplet state, in contrast to using time-dependent density functional theory. The good agreement between the calculated excited state spectra and the experiment provides insight into the nature of the excited states. For the ground and excited triplet state the anharmonic vibrational frequencies are computed using the transition optimized shifted Hermite method, and for these molecules the hybrid B97-1 functional is found to provide the closest agreement with experiment in the ground state.