If the holder is hit by a Electric-type damaging move, it consumes the Cell Battery and its Attack is increased by one stage.
It is not consumed if the holder already has +6 Attack stat stages (unless its Ability is Contrary, in which case it won't activate if the holder has -6 Attack stat stages). It is not consumed if the holder is unaffected by the Electric-type move due to its type (i.e. Ground) or Ability (such as Motor Drive) or is protected from the Electric-type move.
If multiple Pokémon each holding a Cell Battery are hit by an Electric-type move at once, each hit Pokémon will consume its Cell Battery before Symbiosis transfers any item (including Cell Batteries).