Tobias, easy way to remember:
Take the value in wavelength. Divide 107 by this value. Done!
So, 400 nm: 107/400 = 25000 cm-1
Same relationship works for the reverse conversion.
Wavenumber is just the reciprocal of the wavelength, but since wavelength is in nm and the wavenumber is in cm (inverse), there's a factor of 107 for the conversion.