Quantitative, dynamic secondary ion mass spectrometry (SIMS) combined with inductively coupled plasma mass spectrometry (ICPMS) was used to study the origin and distribution of impurities in CdTe/CdS/In2O3:F/glass solar cell structures. Particular emphasis was put on the potentially electrically active impurities that may possibly originate from either the CdTe starting material or the cadmium chloride (CdCl2) post-deposition annealing-induced activation, and that are likely to affect the device performance. Structures were grown using CdTe starting material of 5N and 7N purity, and were analysed by SIMS, both before and after CdCl2 heat treatment. Depth profiles of the elements: Cl, O, Cu, Na, In, Sb, Sn, Si, Zn, Pb and S were made. Around 91% of the impurities detected by ICPMS in the CdCl2 powder used were found to consist of species known to show electrical activity in CdTe. The origin of most of the impurity species present in the cell structures was elucidated, and it was shown that Pb, Sn, Cu and Zn were not coming from the CdTe or CdCl2 starting materials. However, Na and Cl turned out to originate from the CdCl2 processing. The potential interdiffusion of elements, such as S, Te, Si, In and Na from the layers of the structures was also highlighted and is discussed.