Cell formation and machine layout in cellular manufacturing systems (CMs) design are considered as a crucial, yet hard and complex decision process. Owing to the nondeterministic polynomial time (NP) and combinatorial class of this problem, this paper presents an innovative heuristic approach to re-arrange machines enabling the minimisation of inter/intra-cellular movements as well as the cost of material handling between machines, therefore increasing group efficiency and efficacy. The heuristic approach, which is based on group technology, genetic algorithms, and desirability function, determines the optimal solution for flexible cell formation and machine layout within each cell. Flexibility refers to an explicit improvement using the desirability function to modify cell design by altering the ratio data; that is, the weight factor to meet demand flexibility. Specifically, the desirable function proposed here to provide the optimal setting of the weighting factor as a key factor which enables CMs design the flexibility to control the cell size. Promised results were obtained when the proposed approach was applied to a case study. Practical implications and recommendations are provided for use by decision makers in the design of CMs.This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.