The ratio between the prompt ψ(2S) and J/ψ yields, reconstructed via their decays into μ+μ-, is measured in Pb-Pb and p-p collisions at sNN=2.76 TeV. The analysis is based on Pb-Pb and p-p data samples collected by CMS at the Large Hadron Collider, corresponding to integrated luminosities of 150 μb-1 and 5.4 pb-1, respectively. The double ratio of measured yields (Nψ(2S)/NJ/ψ)Pb-Pb/(Nψ(2S)/NJ/ψ)p-p is computed in three Pb-Pb collision centrality bins and two kinematic ranges: one at midrapidity, |y|<1.6, covering the transverse momentum range 6.5<pT<30 GeV/c, and the other at forward rapidity, 1.6<|y|<2.4, extending to lower pT values, 3<pT<30 GeV/c. The centrality-integrated double ratio changes from 0.45±0.13(stat)±0.07(syst) in the first range to 1.67±0.34(stat)±0.27(syst) in the second. This difference is most pronounced in the most central collisions.