The selection of different diimines 4 a-c by alkaline earth ions from a virtual combinatorial library (VCL) is described. The products were stabilized by reduction to the diamines 6 a-c; this allowed easy analysis. The library can be directed toward different target molecules 6 a-c upon addition of alkaline earth ions with different radii. Competition experiments show the possibility of synthesizing the macrocycles 6 a, 6 b, and 6 c simultaneously when using Mg(2+), Ca(2+), and Ba(2+) as template ions. The scope of this thermodynamically controlled, reversible approach for macrocycle syntheses is illustrated.