This paper addresses the problem of keeping an autonomous marine vehicle in a moving triangular formation by regulating its position with respect to two leader vehicles. The follower vehicle has no prior knowledge of the path described by the leaders but has access to their heading angle and is able to measure inter-vehicle ranges. It is assumed that the distance between the leaders is constant and known. A control strategy is adopted that generates speed and heading commands so as to drive suitably defined along track and cross track errors to zero. The commands are used as input to local inner loops for yaw and speed control. The paper describes the algorithms derived for range-based control and assesses their performance in simulations using realistic models of the vehicles involved. Tests with three autonomous marine vehicles equipped with acoustic modems and ranging devices allow for the evaluation of the performance of the algorithms in a real-world situation.