This paper proposes the heuristic algorithm for the generalized GT problem to consider the restrictions which are given the number of cell, maximum number of machines and minimum number of machines. This algorithm is classified into two stages. First stage is the course to form machine cells. we use the similarity coefficient which proposed and calculate the similarity values about each pair of all machines and align these values descending order. If any machine which is composed of selected similarity coefficient is possible to link the other machine on the edge of machine cell and have regard to restrictions and different kind relation among machines in the machine cell, then we assign the machine to the machine cell. Next stage is the course to form part families using proposed grouping efficacy. This stage is also completed when every part is assigned to the machine cell. The results of using the proposed algorithm are compared to the Modified p-median model. The computational results show that the proposed algorithm provides a powerful means of solving the machine-part grouping problem.