Yes.
"Generally, you're not eligible for the exclusion if you excluded the gain from the sale of another home during the two-year period prior to the sale of your home. Refer to Publication 523 for the complete eligibility requirements, limitations on the exclusion amount, and exceptions to the two-year rule."
Reference: https://www.irs.gov/taxtopics/tc701