Yeah, you can take it if you qualify. The test is one sale every two year. Look Home Sale Exclusion
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.