Investors & landlords

Ok so I live there from 2008 to 2018 and then we rented it out for 18 months so that we could get my dads old house back together after it being a rental!!  Then the pandemic hit and we decided to sell!!  It was our primary resident and then the 18 months and then we took ownership for 7 months while we sold it!!  Can we take the exemption?