Er and Yb are two refractory rare-earth elements that have overall similar crystallochemical properties but differ in their temperatures of condensation from the nebular gas. We developed an analytical protocol for the measurement of Er and Yb isotope compositions 1) to establish their isotopic variability in terrestrial magmatic processes 2) to compare their isotopic composition in chondrites, Earth and Moon in order to study fractionation during the high temperature condensation of vapor formed by the giant impact that generated the Moon. The range of mass-dependent isotope fractionation obtained is larger for Yb than Er isotopes. Two effects contribute to the difference between Er and Yb : a redox effect and a temperature effect.First, for terrestrial rocks, the presence of a small fraction of Yb(2+) together with the most common Yb(3+) is inferred from the positive corre- lation between δYb and the La/Yb ratio. Yb(3+) fractionates favorably into tighter bonds and, at the same time, is much more compatible than Yb(2+). Small-degree melts (kimberlite) tend to be enriched in the heavy Yb isotopes, whereas the opposite is true for residual garnets. Second, the stronger volatility of Yb with respect to Er is demonstrated by the apparent deficit of heavy Yb isotopes in the Moon with respect to the Earth, chondrites, and eucrites. Separation of vapor from melt and of heavy from light isotopes is first expected during the adiabatic expansion of the initial vapor plume. Subsequently, friction between melt and gas tends to further enrich the Moon feeding zone in silicate vapor to compensate the inward migration of melt out of the pre-lunar disk. The lighter isotope composition of Yb in lunar samples provides new evidence that the Moon formed by condensation of silicate vapor in the aftermath of the giant lunar impact.Erbium isotope ratios in lunar samples reflect for the first time the capture by 167Er of secondary neutrons produced by interactions of galactic cosmic rays with the lunar surface. The cross section of 167Er for neutron capture being particularly strong and its first resonance standing out at energies poorly covered by other nuclides, 167Er anomalies may help refine the knowledge of the neutron energy spectrum on the Moon and other planetary bodies.