containing polyatomic ions are worked out in a similar way to single atom ions. Except when there is more than one polyatomic ion, then its formula is written inside brackets.
The formula of an ionic compound can be deduced from the formulae of its ions. Remember that for the metal elements in groups 1, 2, and 3 the charge on the ion can be deduced by how many outer shell ...