We study a model of opinion formation based on the theory of social impact and the concept of cellular automata. The case is considered when two strong agents influence the group: a strong leader and an external social impact acting uniformly on every individual. There are two basic stationary states of the system: cluster of the leader's adherents and unification of opinions. In the deterministic limit the variation of parameters like the leader's strength or external impact can change the size of the cluster or, when they reach some critical values, make the system jump to another phase. For a certain range of parameters multistability and hysteresis phenomena are observed. In the presence of noise (social temperature) the rapid changes can be regarded as the first-order phase transitions. When both agents are in a kind of balance, a second-order transition and critical behaviour can be observed. Another kind of noise-induced transitions are the inverses (flips) of the unified group opinion due to random flips of the leader's opinion. Analytical results obtained within a mean field approximation are well reproduced in computer simulations.