Structural and magnetic properties of Er2(Fe1-xCox)15Ga2 compounds with x=0-1.0 were investigated by means of X-ray diffraction and magnetization measurements.X-ray diffraction patterns demonstrate that all samples are single phase with the hexagonal Th2Ni17-type structure.The lattice parameters a,c and the unit cell volumes V are found to decrease linearly with increasing Co concentration.With increasing Co content the saturation magnetization decreases while,but the Curie temperature increases monotonically.The substitution of Co for Fe has a significant effect on the magnetocrystalline anisotropy,and changes the easy magnetization direction from the basal plane to the c-axis at room temperature for x lying between 0.2 and 0.4.The spin reorientation transitions are observed for x<0.5.The spin reorientation temperature Tsr increases with increasing Co concentration from 127.8K for x=0 to 558K for x=0.4.