In this paper, we develop a data-based controller design framework for diffusively coupled systems with guaranteed convergence to an -neighborhood of the desired formation. The controller is comprised of a fixed controller with an adjustable gain on each edge. Via passivity theory and network optimization we not only prove that there exists a gain to attain the desired formation control goal, but we present a data-based method to find an upper bound on this gain. Furthermore, by allowing for additional experiments, the conservatism of the upper bound can be reduced via iterative sampling schemes. The introduced scheme is based on the assumption of passive systems, which we relax by discussing different methods for estimating the systems' passivity shortage, as well as applying transformations passivizing them. Finally, we illustrate the developed model-free cooperative control scheme with two case studies.