The effect of GaAl substitution on the structural and magnetic properties of YGdFe17 has been investigated. A structural transformation from hexagonal to rhombohedral has been observed. The saturation magnetization increases up to x= 1 (Ga)2 (Al) and then decreases with further increase of x. Curie temperature increases from 476 K for YGdFe17 to 595 K for YGdFe14Ga3 and 495 K for YGdFe14Al3 and decreases with further substitution of GaAl. The easy magnetization direction is planar up to x=6 for Ga- and 7 for Al-substituted compounds and shifts to along c axis for x=8. © 2005 American Institute of Physics.