Ionization enthalpy is defined as the energy required to remove electron in the ground state of a gaseous isolated atom.
So it should be taken care that the atom is isolated meaning not in a combined state or bound with any other atom or molecule .
It should be in its ground state remember not in excited state.
Ionization enthalpy generally increases across a period and decreases down a group.