N doped and Al-N codoped ZnO films were prepared by dc reactive magnetron sputtering with a series of metal-Zn targets having different Al contents. The best p-type electrical properties of codoped ZnO, such as carrier concentration of 2.52 x 10(17) cm(-3), resistivity of 28.3 ohm cm can be realized by using 0.4 at.% Al target. Results of Hall effect and X-ray photoelectron spectroscopy (XPS) measurements confirm that the presence of Al indeed facilitates the incorporation of N through formation Al-N bonds in codoped ZnO. Finally, a new judgement for codoping effect in ZnO is proposed tentatively: the best codoping effect can be realized when the codoped ZnO films possess a closest (002) d-spacing value to the nominally undoped ZnO. (c) 2004 Elsevier B.V. All rights reserved.