This paper develops a unified approach, based on ranks, to the statistical analysis of data arising from complex experimental designs. In this way we answer a major objection to the use of rank procedures as a major methodology in data analysis. We show that the rank procedures, including testing, estimation and multiple comparisons, are generated in a natural way from a robust measure of scale. The rank methods closely parallel the familiar methods of least squares, so that estimates and tests have natural interpretations.