We present a method for selectively exciting nuclear magnetic resonances (NMRs) from well-defined subsets of crystallites from a powdered sample under magic angle spinning. Magic angle spinning induces a time dependence in the anisotropic interactions, which results in a time variation of the resonance frequencies which is different for different crystallite orientations. The proposed method exploits this by applying selective pulses, which we refer to as XS (for crystallite-selective) pulses, that follow the resonance frequencies of nuclear species within particular crystallites, resulting in the induced flip angle being orientation dependent. By selecting the radiofrequency field to deliver a 180 degrees pulse for the target orientation and employing a train of such pulses combined with cogwheel phase cycling, we obtain a high degree of orientational selectivity with the resulting spectrum containing only contributions from orientations close to the target. Typically, this leads to the selection of between 0.1% and 10% of the crystallites, and in extreme cases to the excitation of a single orientation resulting in single crystal spectra of spinning powders. Two formulations of this method are described and demonstrated with experimental examples on [1 -(13) C]-alanine and the paramagnetic compound Sm(2)Sn(2)O(7). (C) 2011 American Institute of Physics. [doi:10.1063/1.3640418]