As an extension of a central limit theorem established by Svante Janson, we prove a Berry–Esseen inequality for a sum of independent and identically distributed random variables conditioned by a sum of independent and identically distributed integer-valued random variables.