The crystal field (CF) levels of the ground state multiplets of Ho and Er in R2BaNiO5 have been studied combining inelastic neutron scattering and photoluminescence experiments at temperatures above and below the 1D to 3D magnetic transitions (at 53 and 32 K, respectively) at which the Ni and R sublattices order antiferromagneticaly. In Ho compound 3D magnetic peaks have been detected well above T-N. Energy shift and splitting of several Kramers doublets is observed in Er compound below the magnetic transition due to the local magnetic field at Er sites. No dispersion is detected for the CF transitions. The evolution with temperature of the energy and width of the inelastic and elastic peaks is investigated. The lowest R3+ crystal field levels have been obtained in Ho compound at 0, 1.3, 2.7, 11.6 and 18.1 meV and in Er compound at 0, 4.9, 8.2, 10.4 and 16.6 meV above T-N. (C) 1998 Elsevier Science B.V. All rights reserved.