First-and second-order anisotropy constants, K-1 and K-2, have been determined on aligned samples of Y2Fe17-xGax (x = 0 to 7.5) compounds by measuring magnetization and torque curves at temperatures between 4.2 and 300 K. Low-held ac susceptibility has been studied from 80 K to room temperatures. It has been found that a partial substitution of Ga for Fe in Y2Fe17 initially decreases the absolute value of anisotropy constants thus indicating a weakening of the easy plane character of the Fe anisotropy. The Fe anisotropy becomes uniaxial for a Ga concentration slightly above 6.5 atoms fu(-1). A strengthening of the uniaxial anisotropy with further increase of Ga concentration is indicated by an increase in K-1, determined by torque measurements at room temperatures. The results show the important changes which Fe anisotropy undergoes when Fe atoms are partially substituted by Ga in R2Fe17 compounds. They can be used to separate the anisotropy contributions from the Fe sublattice and the R sublattice in R2Fe17-xGax compounds with magnetic R and thus determine the influence of Ga on the magnetic anisotropy in these materials.