A method of calculating static moments of excited states and transitions between excited states is formulated for non-magic nuclei within the Green function formalism. For these characteristics, it leads to a noticeable difference from the standard QRPA approach. Quadrupole moments of the first 2+ states in Sn and Pb isotopes are calculated using the self-consistent TFFS based on the Energy Density Functional by Fayans et al. with the set of parameters DF3-a fixed previously. A reasonable agreement with available experimental data is obtained.