Using first-principle total energy calculations, we have studied the energetics of codoping [Katayama-Yoshida, Yamamoto, Phys. Stat. Sol. (b) 202 (1997) 763.] in II-VI semiconductors. We demonstrate that (i) for Cd-based II-VI materials such as CdTe, the recently proposed codoping method (e.g.. 2 accepters + 1 donor) may neither increase the solubility of the desired (p-type) dopants nor improve shallowness of the acceptor level. To increase solubility, one needs to suppress the formation of secondary phases involving the dopant by low-T quasi-equilibrium growth/doping processes. To improve the dopant shallowness, one needs to avoid the interaction between the accepters using combinations such as (1 double acceptor + 1 single donor): for example V-Cd(2-) + Cl-Te(perpendicular to). (ii) We further demonstrate that the recent experimental results on p-type ZnO [Joseph et al., Japan J. Appl. Phys. 38 (1999) LI205.] may have little to do with codoping. Instead, the data on n(+)-, p- and p(+)-samples can be consistently understood in terms of increased solubility by incorporating molecular dopants: N2O and NO. The NO doping source is present due to plasma decomposition of N2O. (C) 2001 Elsevier Science B.V. All rights reserved.