An evaluation of methods designed to calculate energy levels in a selected range and application to a (one-dimensional) Morse oscillator and (three-dimensional) HCN/HNC