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