We report on experiments on vertically shaken binary granular mixtures, which separate into their components due to the external excitation. This well-known phenomenon, where large particles rise to the top of the mixture, is called the Brazil-nut effect. Recent theoretical findings predict also a reverse Brazil-nut effect, where large particles sink to the bottom of the container. We choose spherical beads of various diameters and materials in order to observe the transition from Brazil-nut effect to its reverse form. The direction of demixing depends sensitively on the external excitation, so that it is possible to switch between both effects for a given mass density ratio.