Elements with the same number of electrons or the same electronic configuration in the valence shell are observed to be within the same group in the periodic table. The groups are columns in in the periodic table. The elements only have the same charges when they occur as an ion. That is their only similarity apart from being metals or nonmetals. Examples would be elements in Group 1A like Na, Li, K, Rb and Cs.