Quaternary Heusler alloys Co2Cr1−xFexAl with varying Cr to Fe ratio x were investigated experimentally and theoretically. The electronic structure and spectroscopic properties were calculated using the full relativistic Korringa–Kohn–Rostocker method with coherent potential approximation to account for the random distribution of Cr and Fe atoms as well as random disorder. Magnetic effects are included using spin dependent potentials in the local spin density approximation.Magnetic circular dichroism in x-ray absorption was measured at the L2,3 edges of Co, Fe and Cr of the pure compounds and the x = 0.4 alloy in order to determine element specific magnetic moments. Calculations and measurements show an increase of the magnetic moments with increasing iron content. Resonant (560–800 eV) soft x-ray as well as high resolution–high energy (⩾3.5 keV) hard x-ray photo emission was used to probe the density of the occupied states in Co2Cr0.6Fe0.4Al.