A procedure is developed to rigorously decompose experimental loss spectra of medium-energy (50 eV-50 keV) electrons reflected from solid surfaces into contributions due to surface and volume electronic excitations. This can be achieved by analysis of two spectra acquired under different experimental conditions, e.g., measured at two different energies and/or geometrical configurations. The input parameters of this procedure comprise the elastic scattering cross section and the inelastic mean free path for volume scattering. The (normalized) differential inelastic mean free path as well as the differential surface excitation probability are retrieved by this procedure. Reflection electron energy loss spectroscopy (REELS) data for Si, Cu, and Au are subjected to this procedure and the retrieved differential surface and volume excitation probabilities are compared with data from the literature. The present results are compared with earlier proposed procedures in which surface excitations are neglected, in particular the deconvolution formula by Tougaard and Chorkendorff [Phys. Rev. B 35, 6570 (1987)] that is frequently employed for this purpose. It is shown that application of the latter procedure to realistic REELS spectra (that always contain a significant contribution due to surface excitations) does not lead to a single scattering loss distribution of any kind, but rather yields a mixture of contributions of electrons that have suffered an arbitrary number of surface and bulk collisions. Therefore, quantitative interpretation of the retrieved loss distributions is troublesome. On the other hand, the results using the procedure proposed in the present work exhibit satisfactory quantitative agreement with theoretical calculations and verify the commonly accepted model for medium energy electron transport in solids with unprecedented detail.