Yes, if you don't meet the eligibility test (2 years), you may still qualify for a partial exclusion of gain if you moved because of work, health, or an unforeseeable event.
You can qualify either by meeting a set of standard requirements (the “safe harbor” provisions) or by showing enough facts and circumstances to validate your claim.