Excitation of an electron of H-atom from n=2 to any $n_2 $
The excitation of electrons are caused by photons while their de-excitation is causes the emission of photons of the same energy as the energy differemce between two states. The general expression for energy of n-th excited state of H-atom is given by
$$E_n=-\frac{13.6 eV}{n^2}$$

Hence by the conservation of energy, the energy released/absorbed is given by the formula you have written. 
$$h\nu=\Delta E=E_{n_2}-E_{n_1}=13.6\left(\frac{1}{n_1^2}-\frac{1}{n_2^2}\right) eV$$

Hence your initial state is always $n_1$ and final state is always $n_2$. The energy will be positive if photon is absorbed and negative if it is released.

So, for specific values of $n_1$ and $n_2$ ($n_1&lt;n_2$), if the photon released while going from $n_2$ to $n_1$ is in visible range, the photon absorbed for corresponding excitation will have same frequency, and hence it has to be in visible range.

Please note that there are selection rules for the transitions, determined by the
transition moment integral. Please go through the book in refernece for details.

References:


D.J. Griffiths, Introduction to Quantum Mechanics , Pearson, 2 ed,  2004. ISBN: 9332542899