Whenever he was in company he wanted to get away, and whenever he was alone he wanted company.
or simply: