This paper introduces a near-optimal heuristic based on sorting methods to minimize the total or mean flowtime (completion time) for the n-job, M-machine flowshop. The mean flowtime criterion is important, because many important cost measures, such as finished goods turn-over, depend on flowtime. A simulation study is conducted to test the effectiveness of the proposed heuristic by comparing it with those of Rajendran and Rajendran and Chaudhuri. The simulation results show that the proposed heuristic performs better than the two existing heuristics, especially when the number of jobs is large (≥20). Further, the results show that the proposed heuristic averages to 0.16% above the optimum for 2000 small test problems, ranging from five to nine jobs and from three to ten machines.